2017-05-27 217 views
1

這些都是我與PIP在Mac上安裝tweepy不工作

$ python --version 
Python 2.7.10 
$ pip --version 
pip 9.0.1 from /Library/Python/2.7/site-packages (python 2.7) 

工作的理想我應該能夠安裝tweepy版本。但是這並沒有發生。

$ pip install tweepy 
Collecting tweepy 
    Using cached tweepy-3.5.0-py2.py3-none-any.whl 
Collecting six>=1.7.3 (from tweepy) 
    Using cached six-1.10.0-py2.py3-none-any.whl 
Requirement already satisfied: requests>=2.4.3 in /Library/Python/2.7/site-packages (from tweepy) 
Requirement already satisfied: requests-oauthlib>=0.4.1 in /Library/Python/2.7/site-packages (from tweepy) 
Requirement already satisfied: oauthlib>=0.6.2 in /Library/Python/2.7/site-packages (from requests-oauthlib>=0.4.1->tweepy) 
Installing collected packages: six, tweepy 
    Found existing installation: six 1.4.1 
    DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project. 
    Uninstalling six-1.4.1: 
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 "/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-CBvMLu-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info' 

任何人都可以幫忙嗎?

更新也嘗試了以下內容。但並沒有解決問題

$ sudo -H pip install tweepy 

回答

1

與安裝:

sudo pip install tweepy 

看起來像一個權限問題:)

+0

試過了。不工作。 –

0

我得到了同樣的問題。我解決它的方式是從官方網站下載python 2.7.13並安裝它。在那之後,我安裝了PIP:

sudo easy_install pip 

而在這之後:

pip install tweepy 

希望它仍然是相關的:)