Saya menggunakan instalasi python buatan sendiri dan mendapatkan kesalahan menggunakan pip dalam a virtualenvwrapper lingkungan Hidup:
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 memiliki formula untuk libffi ( brew install libffi
), yang sepertinya berhasil.
saya bisa berlari
$ python-config --include
yang menghasilkan:
-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
Jadi haruskah saya "menambahkan direktori yang mengandung` libffi.pc '"?
echo $PKG_CONFIG_PATH
menghasilkan string kosong.
[Seseorang di SO merekomendasikan] [3]:
Use -I /opt/local/include on the command line
atau
C_INCLUDE_PATH=/opt/local/include in the environment.
Apakah saya akan menambahkan baris:
C_INCLUDE_PATH=/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include/python2.7
ke ~/.bash_profile
?
atau mungkin export PKG_CONFIG_PATH=/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include/python2.7