Python Tweepy安装问题
我在导入tweedy时遇到问题:Python Tweepy安装问题,python,tweepy,Python,Tweepy,我在导入tweedy时遇到问题: this is the error received Traceback (most recent call last): File "star_twitter.py", line 71, in <module> send_to_twitter(get_price()) File "star_twitter.py", line 9, in send_to_twitter import tweepy ImportError: No module na
this is the error received
Traceback (most recent call last):
File "star_twitter.py", line 71, in <module>
send_to_twitter(get_price())
File "star_twitter.py", line 9, in send_to_twitter
import tweepy
ImportError: No module named tweepy
这是收到的错误
回溯(最近一次呼叫最后一次):
文件“star_twitter.py”,第71行,在
发送到推特(获取价格())
文件“star_twitter.py”,第9行,在send_to_twitter中
进口粗花呢
ImportError:没有名为tweepy的模块
我尝试重新安装它,但现在收到以下错误消息
Downloading/unpacking tweepy
Downloading tweepy-3.3.0.tar.gz
Running setup.py egg_info for package tweepy
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/pi/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/pi/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/pi/build/tweepy
Storing complete log in /root/.pip/pip.log
下载/解包tweepy
下载tweepy-3.3.0.tar.gz
正在运行包tweepy的setup.py egg\u信息
回溯(最近一次呼叫最后一次):
文件“”,第14行,在
文件“/home/pi/build/tweepy/setup.py”,第17行,在
安装需求=解析需求('requirements.txt',session=uuid.uuid1())
TypeError:parse_requirements()获得意外的关键字参数“session”
从命令python setup.py egg_info完成输出:
回溯(最近一次呼叫最后一次):
文件“”,第14行,在
文件“/home/pi/build/tweepy/setup.py”,第17行,在
安装需求=解析需求('requirements.txt',session=uuid.uuid1())
TypeError:parse_requirements()获得意外的关键字参数“session”
----------------------------------------
命令python setup.py egg_info失败,错误代码为/home/pi/build/tweepy中的1
在/root/.pip/pip.log中存储完整的日志
感谢您的帮助您正在使用virtualenv,这一事实确实有所帮助。如果您使用了
sudo
尝试安装tweepy,那么这就是安装出错的地方
仅尝试使用pip安装tweepy
如果您仍然从中得到错误,那么您的virtualenv可能已经损坏。请执行以下操作:
$ deactivate
$ rmvirtualenv nlmanagement
$ mkvirtualenv nlmanagement
$ pip install -r requirements.txt
请先尝试安装pip
,并仅在virtualenv中用于将来的需要。您可能会遇到这样的问题。尝试升级pip
sudo pip install --upgrade pip
你使用的是哪一版本的python和pip?你是在Windows、Mac还是Linux上?pyhon 3.2.3我正在用我的Mac上的树莓皮ssh’ed运行它,所以我猜你是在你的皮上运行Linux。您能告诉我们您的
pip
版本吗?pip版本是/usr/lib/python2.7/dist-packages(python 2.7)中的pip 1.1,无法运行上述命令。收到以下错误消息:bash:rmvirtualenv:command not found