尝试使用pip安装bcrypt时出现此错误。我已经在几个地方安装了libffi(Xcode OS X
SDK,并且是通过自制软件),但是我不知道如何告诉pip查找它。有什么建议?
Downloading/unpacking bcrypt==1.0.2 (from -r requirements.txt (line 41))
Running setup.py egg_info for package bcrypt
OS/X: confusion between 'cc' versus 'gcc' (see issue 123)
will not use '__thread' in the C code
c/_cffi_backend.c:14:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
^
1 error generated.
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/Users/cody/virtualenvs/analytics/build/bcrypt/setup.py", line 104, in <module>
"Programming Language :: Python :: 3.3",
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "build/bdist.macosx-10.9-intel/egg/setuptools/dist.py", line 239, in __init__
File "build/bdist.macosx-10.9-intel/egg/setuptools/dist.py", line 264, in fetch_build_eggs
File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 620, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 858, in best_match
return self.obtain(req, installer) # try and download/install
File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 870, in obtain
return installer(requirement)
File "build/bdist.macosx-10.9-intel/egg/setuptools/dist.py", line 314, in fetch_build_egg
File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 593, in easy_install
File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 623, in install_item
File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 811, in install_eggs
File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 1017, in build_and_install
File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 1005, in run_setup
distutils.errors.DistutilsError: Setup script exited with error: command 'cc' failed with exit status 1
Complete output from command python setup.py egg_info:
OS/X: confusion between 'cc' versus 'gcc' (see issue 123)
will not use '__thread' in the C code
c/_cffi_backend.c:14:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
^
1 error generated.
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/Users/cody/virtualenvs/analytics/build/bcrypt/setup.py", line 104, in <module>
"Programming Language :: Python :: 3.3",
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "build/bdist.macosx-10.9-intel/egg/setuptools/dist.py", line 239, in __init__
File "build/bdist.macosx-10.9-intel/egg/setuptools/dist.py", line 264, in fetch_build_eggs
File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 620, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 858, in best_match
return self.obtain(req, installer) # try and download/install
File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 870, in obtain
return installer(requirement)
File "build/bdist.macosx-10.9-intel/egg/setuptools/dist.py", line 314, in fetch_build_egg
File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 593, in easy_install
File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 623, in install_item
File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 811, in install_eggs
File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 1017, in build_and_install
File "build/bdist.macosx-10.9-intel/egg/setuptools/command/easy_install.py", line 1005, in run_setup
distutils.errors.DistutilsError: Setup script exited with error: command 'cc' failed with exit status 1
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /Users/cody/virtualenvs/analytics/build/bcrypt
不使用sudo和CFLAGS和CPPFLAGS(pip不需要):
$ brew install pkg-config libffi
$ export PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.0.13/lib/pkgconfig/
$ pip install bcrypt
问题内容: 我使用pip成功安装了不同的模块,它们显示在 如: 从航站楼 但是,每当我尝试导入它时 /或或 显示以下错误: 更新: 如果我在正确的site-packages目录中启动python 然后就可以了。如果直接在终端上编写,这将解决该问题。但是,我对如何使其在file.py中正常工作一无所知。 据我所知,我只安装了Python2.7。 来自file.py 如果我有一个file.py保存在某
我使用pip成功安装了不同的模块,它们显示在 例如: 但是,每当我尝试导入它时 / 导入 或导入或 显示以下错误: 更新:如果我在正确的站点包目录下启动python 然后就成功了。如果直接在终端上书写,这将解决问题。然而,我不知道如何让它在file.py中工作,这将是正常的使用。 据我所知,我只安装了Python2.7。 如果我有文件。py保存在某个本地文件夹中。例如,它包含 当我尝试时 我得到同
问题内容: 我无法在计算机上使用进行安装,因为遇到以下错误。我一直在排除此问题,但运气不佳。您可以建议任何步骤来诊断或解决问题,以便我可以成功运行吗? 问题答案: 简单的解决方案是从“ bcrypt” npm模块切换到或。它是完全相同的API,但使用纯JS,因此无需处理本机附加组件。 然后将您的调用更改为“ bcryptjs”,但是所有其他代码都可以保持不变。 从长远来看,我怀疑目前bcrypt可
问题内容: 不知道这里发生了什么,但是每次尝试使用pip安装某些东西时,我都会收到一个错误: 命令“ / usr / bin / python -c”导入设置工具,标记化; file =’/ private / var / folders / b0 / 5843zgyj1yz3b8q2l7wrtj8h0000gn / T / pip-build-V4hy8S / PySocks / setup.p
我试图在Windows7中为Python3.4安装一个图表工具(Matplotlib-V1.4.2),但到目前为止,我的所有尝试似乎都无法完成这一工作。 尝试: 我已从GitHub下载了pip -不使用 这里有一个类似的问题,我也尝试了这些建议,但我得到了以下错误 我肯定我错过了什么,你的一步一步的指导在这方面将非常感谢。
在命令提示符下通过pip installer for Python3.7安装pandas时,我反复遇到以下错误 我已经通过管理员运行了该命令,但它没有运行。