2017-08-07 123 views
0

回溯錯誤,我試圖用pip install twilio,還試圖$sudo pip install twilio,一直得到以下錯誤,無法在其他地方找到解決辦法,請大家幫幫忙:Python的PIP安裝問題 - 在安裝Twilio

Exception: 
Traceback (most recent call last): 
    File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main 
    status = self.run(options, args) 
    File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run 
    prefix=options.prefix_path, 
    File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 778, in install 
    requirement.uninstall(auto_confirm=True) 
    File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 754, in uninstall 
    paths_to_remove.remove(auto_confirm) 
    File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove 
    renames(path, new_path) 
    File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 267, in renames 
    shutil.move(old, new) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move 
    copy2(src, real_dst) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2 
    copystat(src, dst) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat 
    os.chflags(dst, st.st_flags) 
OSError: [Errno 1] Operation not permitted: '/tmp/pip-XS_kT9-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pyOpenSSL-0.13.1-py2.7.egg-info' 
+0

https://stackoverflow.com/questions/31900008/oserror-errno-1-operation-not-permitted-when-installing-scrapy-in-osx -10-11 –

+0

什麼是您的操作系統? – Zcode

+0

@Zcode Mac OS Sierra 10.12.5 – huisleona

回答

1

再次安裝Python :

brew install python 

,然後嘗試:

pip install twilio or sudo pip install twilio 
+0

沒有工作。仍然得到相同的錯誤。 – huisleona

0

明白了想通了。 顯然,我已經在Mac OS上安裝了默認Python 2.7之上的Python 3.6。所以每當我做pip install twilio時,它都會在Python3中安裝pip時查看默認的2.7庫。 所以我能夠通過運行來解決它:

Python3 pip install twilio