我尝试安装外部包的第一个文件 - twitter 1.14.3(在 Windows 7 上)
所以我将包下载到c:\python33 witter-1.14.3,
然后我跑:
python.exe c:\python33\twitter-1.14.3\setup.py install
Finished processing..
现在我正在尝试使用这个新模块:
from twitter import *
我收到一个错误:
Traceback (most recent call last):
File "test1.py", line 1, in <module>
\ufefffrom twitter import *
ImportError: No module named 'twitter'
当我尝试运行 twitter.exe 时,我得到:
c:\Python33\Scripts>twitter.exe
Traceback (most recent call last):
File "c:\Python33\Scripts\twitter-script.py", line 9, in <module>
load_entry_point('twitter==1.14.3', 'console_scripts', 'twitter')()
File "c:\Python33\lib\site-packages\setuptools-5.4.1-py3.3.egg\pkg_resources.py", line 356, in load_entry_point
File "c:\Python33\lib\site-packages\setuptools-5.4.1-py3.3.egg\pkg_resources.py", line 2476, in load_entry_point
File "c:\Python33\lib\site-packages\setuptools-5.4.1-py3.3.egg\pkg_resources.py", line 2190, in load
ImportError: No module named 'twitter'
有什么想法吗?
谢谢/
导航到您友好的邻居命令提示符并输入以下内容:
pip install twitter
它应该显示类似“正在安装收集的软件包...成功安装 twitter-1.18.0”
然后从您的 IDE 运行:
import twitter # work with Twitter APIs
并继续设置您的 API 密钥