Ne peut pas charger les modules Python installé via pip de site-packages répertoire

Je suis en train d'installer et d'utiliser Evernote module (https://github.com/evernote/evernote-sdk-python) . J'ai couru pip install evernote et il est dit que l'installation a fonctionné.

Je peux confirmer que le evernote module existe dans /usr/local/lib/python2.7/site-packages. Cependant, lorsque j'essaie d'exécuter python -c "import evernote" j'obtiens l'erreur suivante:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named evernote

C'est le contenu de mon .bash-profile:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

# Setting PATH for Python 3.3
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.3/bin:${PATH}"
export PATH
export PATH=$PATH:/usr/local/bin/

Je vais avoir ce même problème avec d'autres modules installés avec pip. De l'aide?

EDIT: je suis un super débutant et n'avez pas édité que .bash-profile fichier.

EDIT: python -c 'import sys; print "\n".join(sys.path)' résultats suivants:

/Library/Python/2.7/site-packages/setuptools-1.3.2-py2.7.egg
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC
/Library/Python/2.7/site-packages

EDIT: il me semblait avoir fait des progrès vers une solution en ajoutant export PYTHONPATH=“/usr/local/lib/python2.7/site-packages” à mon .bash_profile fichier. Cependant, maintenant quand je lance python -c 'from evernote.api.client import EvernoteClient' il tente d'importer oauth2, qui échoue avec le même message d'erreur. Le ouath2 module est présent dans le répertoire du module.

  • Je peux confirmer que je suis à l'aide de Python 2.7.5.
  • Essayez cette ligne afin de vérifier si Evernote SDK est installé python -c 'from evernote.api.client import EvernoteClient'
  • python --version donne mon 2.7.5. Je ne suis pas sûr de la façon que les commentaires ont été ajoutés à la .bash-profile. J'ai Python 3 est installé, mais je dois utiliser python3 pour l'utiliser.
  • Cette ligne est ce que j'utilisais, et il ne fonctionne pas. Je reçois ImportError: No module named evernote.api.client
  • Ce n' type python de sortie? qu'en est python -c 'import sys; print "\n".join(sys.path)'?
  • type python me donne: python is /usr/bin/python j'ai mis à jour mon post avec la sortie de cette deuxième commande.

InformationsquelleAutor Chase McCoy | 2014-08-13