I am trying to install and use the Evernote module (https://github.com/evernote/evernote-sdk-python) . I ran pip install evernote
and it says that the installat
I figured it out! I added this line:
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages
to my .bash_profile
and now I can import modules stored in that directory. Thanks for everyone who answered.
/usr/bin/python
is the executable for the python that comes with OS X. /usr/local/lib
is a location for user-installed programs only, possibly from Python.org or Homebrew. So you're mixing different Python installs, and changing the python path is only a partial workaround for different packages being installed for different installations.
In order to make sure you use the pip
associated with a particular python, you can run python -m pip install <pkg>
, or go look at what the pip
on your path is, or is symlinked to.
I faced similar problem,its related to /usr/local/lib/python2.7/site-packages had no read or write permission for group and other, and they were owned by root. This means that only the root user could access them.
Try this:
$ sudo chmod -R go+rX /usr/local/lib/python2.7/site-packages
None of this helped me with my similar problem. Instead, I had to fix the newly installed files permissions to be able to import. This is usually an obvious thing, but not so much when you use sudo
when installing module/packages.
Simply just type in terminal:
sudo pip install pillow
and type import
(whatever you like) or type from
(whatever you like) import
(whatever you like).