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.
I recommend you, using easy_install for installing python modules. It's easy and clean.
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.
精彩评论