gpt4 book ai didi

python - 尝试通过 Buildout 在 Ubuntu 上安装 PyCrypto,src/config.h : No such file or directory

转载 作者:太空宇宙 更新时间:2023-11-03 15:25:24 25 4
gpt4 key购买 nike

我正在尝试通过 Buildout(通过 easy_install)在 Ubuntu 实例上安装 PyCrypto,但出现以下错误:

Getting distribution for 'pycrypto>=1.9'.
Running easy_install:
/usr/bin/python "-S" "-c" "import sys,os;p = sys.path[:];import site;sys.path[:] = p; [sys.modules.pop(k) for k, v in sys.modules.items() if hasattr(v, '__path__') and len(v.__path__)==1 and not os.path.exists(os.path.join(v.__path__[0],'__init__.py'))];from setuptools.command.easy_install import main;main()" "-mUNxd" "/opt/rocktech/buildout/cache/eggs/tmppKIfK7" "-Z" "/opt/rocktech/buildout/cache/download/dist/pycrypto-2.4.tar.gz"
path=/opt/rocktech/buildout/cache/eggs/setuptools-0.6c12dev_r88846-py2.6.egg

Processing pycrypto-2.4.tar.gz
Running pycrypto-2.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-dD_8Pu/pycrypto- 2.4/egg-dist-tmp-_d3xDl
error: Setup script exited with error: src/config.h: No such file or directory
An error occurred when trying to install pycrypto 2.4. Look above this message for any errors that were output by easy_install.
While:
Installing django.
Getting distribution for 'pycrypto>=1.9'.
Error: Couldn't install: pycrypto 2.4

知道是什么原因造成的吗?

值得注意的是,我在 Snow Leopard 本地遇到了同样的问题,我能够通过直接下载代码并运行 python manage.py buildpython manage.py install< 来修复它 手动。我想在这里避免这种情况,因为我要部署到十几台服务器。

最佳答案

即使使用最新的 pycrypto,我仍然遇到这个问题,所以我只运行 ./configure 并创建了 src/config.h,所以现在只需运行 pip 或 easy_install 或 setup。皮……

关于python - 尝试通过 Buildout 在 Ubuntu 上安装 PyCrypto,src/config.h : No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7896541/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com