在 Ubuntu 上安装 tweepy 时遇到以下错误。
sudo pip install tweepy
Downloading/unpacking tweepy
Running setup.py egg_info for package tweepy
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/vivek/build/tweepy/setup.py", line 17, in <module>
install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1())
TypeError: parse_requirements() got an unexpected keyword argument 'session'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/vivek/build/tweepy/setup.py", line 17, in <module>
install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1())
TypeError: parse_requirements() got an unexpected keyword argument 'session'
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/vivek/build/tweepy
Storing complete log in /home/vivek/.pip/pip.log
请帮忙。我在 Google 上搜索了这个错误,但没有找到任何帮助。
答案1
(1)请检查pip的版本。
>pip list BeautifulSoup (3.2.1) oauthlib (1.0.3) pip (7.1.2) # <-- this is mine, today. tweepy (3.5.0) ....
(2)如果你的情况不是这样,请尝试一下。
>pip install --upgrade pip # <-- to upgrade pip by pip >pip install tweepy
(3.脚注)因为我在 Windows8 上使用,所以我不使用“sudo”。请自行承担风险,祝你好运。