0

I can't install Twilio using pip install twilio. It gives this error:

Running setup.py install for twilio ... error
ERROR: Command errored out with exit status 1:
 command: 'C:\Users\PC\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\PC\\AppData\\Local\\Temp\\pip-install-24qqtllg\\twilio\\setup.py'"'"'; __file__='"'"'C:\\Users\\PC\\AppData\\Local\\Temp\\pip-install-24qqtllg\\twilio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\PC\AppData\Local\Temp\pip-record-j29nk9s3\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Include\twilio'
     cwd: C:\Users\PC\AppData\Local\Temp\pip-install-24qqtllg\twilio\
doxin
  • 698
  • 1
  • 7
  • 22
  • Try running as admin. – Joshua Nixon Mar 24 '20 at 12:46
  • 1
    Ugh, no, please _don't_ run this as admin! Mixing `pip`-installed libraries and system-level libraries is a bad idea. More generally, the attitude of "X didn't work so I'll just `sudo` it" is very dangerous. If you're going to use elevated privileges you should have a specific reason. – ChrisGPT was on strike Mar 24 '20 at 12:51
  • 1
    What's the rest of that error message? There should be more helpful output above it. – ChrisGPT was on strike Mar 24 '20 at 12:51
  • I've just added the rest of the error. – BoostedAnimal Mar 24 '20 at 13:00
  • 1
    I've fixed the formatting for you, Are you sure that that's *all* the output? right from when you run the command all the way to the end? I'm asking because basically all the error you've included is saying is "Something went wrong when running setup.py". Normally I'd expect it to at the very least output a traceback too, which you can recognise by the line "Traceback (most recent call last):" If this is indeed all the output it'll be pretty tricky to debug! See https://stackoverflow.com/questions/11543578/copy-text-from-a-windows-cmd-window-to-clipboard on how to copy from a cmd window. – doxin Mar 24 '20 at 13:07
  • It wasn't the whole error because it's pretty long. I've fixed it though by installing it through Pycharm instead of pip. – BoostedAnimal Mar 24 '20 at 13:44

0 Answers0