日食 + Pydev +推特图书馆问题
我正在阅读 Matthew A. Russell 的《挖掘 Twitter》。我已经从 http://pypi.python.org/pypi/twitter 安装了 twitter 库,但是我似乎无法将这套工具作为外部库正确链接。
我已添加以下文件夹作为外部库,但我仍然
'Unresolved import: twitter, twitter Found at: number, import twitter' error when importing 'twitter':
/usr/local/lib/python2.6/dist-packages/
/usr/local/lib/python2.6/dist-packages/twitter-1.6.1-py2.6.egg/
/usr/local/lib/python2.6/dist-packages/twitter-1.6.1-py2.6.egg/EGG-INFO
/usr/local/lib/python2.6/dist-packages/twitter-1.6.1-py2.6.egg/twitter/
提前感谢您提供的任何帮助。
I am working my way through 'Mining Twitter' by Matthew A. Russell. I have installed the twitter library from http://pypi.python.org/pypi/twitter but I can't seem to get this set of tools linked in correctly as an external library.
I have added the following folders as external libraries, but I still get an
'Unresolved import: twitter, twitter Found at: number, import twitter' error when importing 'twitter':
/usr/local/lib/python2.6/dist-packages/
/usr/local/lib/python2.6/dist-packages/twitter-1.6.1-py2.6.egg/
/usr/local/lib/python2.6/dist-packages/twitter-1.6.1-py2.6.egg/EGG-INFO
/usr/local/lib/python2.6/dist-packages/twitter-1.6.1-py2.6.egg/twitter/
Thanks in advance for any help you can throw my way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我建议您使用 easy_install 来安装 python 模块。它既简单又干净。
I recommend you, using easy_install for installing python modules. It's easy and clean.
相当确定您只是创建了这些文件夹,并且可能复制了该 .egg 文件?
您应该做的相对是这样的:
打开终端,并将您的目录(cd)更改为 twitter 库下载到的位置。然后,您应该能够输入“python install setup.py”。请注意,这主要是在您使用 .tar 文件时。
如果它似乎给您带来任何麻烦,请尝试安装 SetupTools EasyInstall。这应该可以解决任何问题。
Fairly sure you simply made those folders and perhaps copied that .egg file in?
What you should be doing, is relatively this:
Open up the terminal, and change your directory(cd) to where the twitter library is downloaded to. Then, you should be able to put, "python install setup.py" through. Note, this is primarily if you're going with the .tar file.
If it seems to be giving you any trouble, try and install SetupTools EasyInstall. That should work out any problems.