我通过先克隆它来安装tweepy:
git clone git://github.com/tweepy/tweepy.git
将tweepy-2.2-py2.7.egg
复制到C:\Python27\Lib\site-packages
。
然后使用以下命令从tweepy目录安装它:
python setup.py install
安装过程的最后一行说明:
Installed c:\users\linus\appdata\local\enthought\canopy32\user\lib\site-packages\tweepy-2.2-py2.7.egg
Processing dependencies for tweepy==2.2
Finished processing dependencies for tweepy==2.2
但是,我仍然收到错误:
Traceback (most recent call last):
File "C:\Users\Linus\Documents\GitHub\Toxic\src\main.py", line 3, in <module>
from api.Twitter import Twitter
File "C:\Users\Linus\Documents\GitHub\Toxic\src\api\Twitter.py", line 1, in <module>
import time,tweepy,sys,json
ImportError: No module named tweepy