Sto usando un'installazione homebrew di python e ricevo un errore usando pip all'interno di un virtualenvwrapper ambiente:
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing 'libffi.pc'
to the PKG_CONFIG_PATH environment variable
Homebrew ha una formula per libffi ( brew install libffi
), che sembrava avere successo.
Posso eseguire
$ python-config --include
che produce:
-I/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include/python2.7
Quindi dovrei "aggiungere la directory contenente 'libffi.pc'"?
echo $PKG_CONFIG_PATH
produce una stringa vuota.
[Qualcuno su SO aveva raccomandato] [3]:
Use -I /opt/local/include on the command line
o
C_INCLUDE_PATH=/opt/local/include in the environment.
Aggiungerei la riga:
C_INCLUDE_PATH=/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include/python2.7
al ~/.bash_profile
?
o forse export PKG_CONFIG_PATH=/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include/python2.7