简体   繁体   English

Tweepy安装问题

[英]Tweepy Installation Issue

I am having problems with importing tweedy: 我在导入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 named tweepy

I tried re-installing it but now am receiving the following error message 我尝试重新安装它,但现在收到以下错误消息

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

Your assistance will be appreciated 您的协助将不胜感激

You may have faced known problem . 您可能遇到了已知问题 Try upgrading pip. 尝试升级点子。

sudo pip install --upgrade pip

The fact that you're using virtualenv does help. 您正在使用virtualenv的事实确实有帮助。 If you used sudo trying to install tweepy then that's where the installation went wrong. 如果您使用sudo尝试安装tweepy,那么这就是安装错误的地方。

Try using pip install tweepy only. 尝试仅使用pip install tweepy

If you're still getting an error from that then your virtualenv has probably became corrup. 如果您仍然从中得到错误,那么您的virtualenv可能已经崩溃。 Do the following: 请执行下列操作:

$ deactivate
$ rmvirtualenv nlmanagement
$ mkvirtualenv nlmanagement
$ pip install -r requirements.txt

Try the pip installation first and only use that for future needs in virtualenv. 首先尝试安装pip然后仅将其用于virtualenv中的将来需求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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