简体   繁体   中英

Twilio for Python installation errror (Win10)

I successfully added python to my PATH. I found these instructions on https://www.twilio.com/docs/python/install#installation .

I get the following error when I try to run the following command on my Command Prompt :

python setup.py install

Error :

C:\Python27>python setup.py install
Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    with open('twilio/version.py') as f:
IOError: [Errno 2] No such file or directory: 'twilio/version.py'

I also took out the setup.py file from the twilio folder and placed it into C:\\Python27 directory.

Why is this error occuring ?

It's better to install it via pip:

pip install twilio 

If you must install it from source, first unpack the source code from the zip archive. Then locate the setup.py file. You need to run it in the same directory. So for example, if you unpacked twilio to D:\\twilio and your setup file path is D:\\twilio\\setup.py , you first need to change directory to there.

cd D:\twilio\setup.py
python setup.py install

Looks like you tried to copy the setup.py file to your Python installation folder and tried to run it from there. That will not work since the setup file depends on other files in that unpacked source directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM