Reputation: 610
I've used easy_install to get one or two modules, then I used pip to install the Twitter module.
However the newer version of Python I downloaded can't see these modules, only the built in OSX version can.
Also, I am now unable to download NLTK which I need for some examples I'm working through on a really good book called "Mining the Social Web".
Any thoughts?
Upvotes: 1
Views: 858
Reputation: 1052
Install the packages with the binary from your version of python. So for example if your version is in /usr/local/bin then installing would be either:
Upvotes: 1
Reputation: 30250
It depends on whether the modules you downloaded are compatible with the version of Python you are trying to run. I can't really figure out what module / Python versions you are talking about, but if it's compatible, all you would need to do is add the module path to the PYTHONPATH. You can do this either in your environment variable or within you python script.
From the documentation:
PYTHONPATH¶
Augment the default search path for module files. The format is the same as the shell’s PATH: one or more directory pathnames separated by os.pathsep (e.g. colons on Unix or semicolons on Windows). Non-existent directories are silently ignored.
In addition to normal directories, individual PYTHONPATH entries may refer to zipfiles containing pure Python modules (in either source or compiled form). Extension modules cannot be imported from zipfiles.
The default search path is installation dependent, but generally begins with prefix/lib/pythonversion (see PYTHONHOME above). It is always appended to PYTHONPATH.
An additional directory will be inserted in the search path in front of PYTHONPATH as described above under Interface options. The search path can be manipulated from within a Python program as the variable sys.path.
Note that the last sentence refers to the second method I mentioned, adding search a path inside your Python file.
Upvotes: 0