“pip3 install apex”失败,无法构建密码(已安装)

2024-05-29 06:25:39 发布

您现在位置:Python中文网/ 问答频道 /正文

问题:pip3 install apex由于未能构建密码而失败,错误如下。在

使用以下一个行程序成功地安装了cryptacular(在尝试安装apex之前):pip3 install -e hg+https://bitbucket.org/dholth/cryptacular@cb96fb3#egg=cryptacular 不知何故,它不会用普通的pip/pip3 install cryptacular安装,所以我发现成功安装这个包的唯一方法是遵循these instructions,相当于these instructions。在

但是,一旦我运行pip3 install apex,我又收到了完全相同的错误。在

这似乎不是pip/pip3问题-我尝试过两种方法,结果都一样。在

你知道我做错了什么吗?在

Collecting apex
Collecting requests (from apex)
  Using cached https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl
----------------------- loads of "collecting" messages -------------------------
Collecting PasteDeploy>=2.0 (from plaster-pastedeploy->pyramid>1.1.2->apex)
  Using cached https://files.pythonhosted.org/packages/67/0c/faa9971b2e5e048b3b30008d04c72e4d5f63b42f48937c169acce2c5e70a/PasteDeploy-2.0.1-py2.py3-none-any.whl
Building wheels for collected packages: cryptacular
  Running setup.py bdist_wheel for cryptacular ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-d8_sob/cryptacular/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp7vBhDEpip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-2.7
  creating build/lib.linux-x86_64-2.7/cryptacular
  copying cryptacular/__init__.py -> build/lib.linux-x86_64-2.7/cryptacular
  creating build/lib.linux-x86_64-2.7/cryptacular/bcrypt
  copying cryptacular/bcrypt/__init__.py -> build/lib.linux-x86_64-2.7/cryptacular/bcrypt
  copying cryptacular/bcrypt/test_bcrypt.py -> build/lib.linux-x86_64-2.7/cryptacular/bcrypt
  creating build/lib.linux-x86_64-2.7/cryptacular/core
  copying cryptacular/core/test_core.py -> build/lib.linux-x86_64-2.7/cryptacular/core
  ...
  creating build/temp.linux-x86_64-2.7/cryptacular/bcrypt
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/crypt_blowfish.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/crypt_blowfish.o
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/crypt_gensalt.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/crypt_gensalt.o
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/wrapper.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/wrapper.o
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c cryptacular/bcrypt/_bcrypt.c -o build/temp.linux-x86_64-2.7/cryptacular/bcrypt/_bcrypt.o
  In file included from /usr/include/python2.7/Python.h:47:0,
                   from cryptacular/bcrypt/_bcrypt.c:26:
  crypt_blowfish-1.2/crypt.h:17:10: fatal error: gnu-crypt.h: No such file or directory
   #include <gnu-crypt.h>
            ^~~~~~~~~~~~~
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for cryptacular
  Running setup.py clean for cryptacular
Failed to build cryptacular
Installing collected packages: urllib3, certifi, chardet, idna, requests, wtforms, wtforms-recaptcha, setuptools, zope.interface, repoze.lru, PasteDeploy, plaster, plaster-pastedeploy, webob, venusian, zope.deprecation, translationstring, hupper, pyramid, oauthlib, requests-oauthlib, python-openid, anykeystore, velruse, transaction, repoze.sendmail, pyramid-mailer, SQLAlchemy, zope.sqlalchemy, pbkdf2, cryptacular, apex
  Running setup.py install for cryptacular ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-d8_sob/cryptacular/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-Br1FfW-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/cryptacular
    copying cryptacular/__init__.py -> build/lib.linux-x86_64-2.7/cryptacular
    creating build/lib.linux-x86_64-2.7/cryptacular/bcrypt
    copying cryptacular/bcrypt/__init__.py -> build/lib.linux-x86_64-2.7/cryptacular/bcrypt
    ...
    creating build/temp.linux-x86_64-2.7/cryptacular/bcrypt
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/crypt_blowfish.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/crypt_blowfish.o
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/crypt_gensalt.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/crypt_gensalt.o
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c crypt_blowfish-1.2/wrapper.c -o build/temp.linux-x86_64-2.7/crypt_blowfish-1.2/wrapper.o
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/include/python2.7 -c cryptacular/bcrypt/_bcrypt.c -o build/temp.linux-x86_64-2.7/cryptacular/bcrypt/_bcrypt.o
    In file included from /usr/include/python2.7/Python.h:47:0,
                     from cryptacular/bcrypt/_bcrypt.c:26:
    crypt_blowfish-1.2/crypt.h:17:10: fatal error: gnu-crypt.h: No such file or directory
     #include <gnu-crypt.h>
              ^~~~~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-d8_sob/cryptacular/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-Br1FfW-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-d8_sob/cryptacular/

更新: 一旦我强迫gnu-crypt.h到所需的位置:cd /usr/include && sudo mv crypt.h gnu-crypt.h我得到了一个新的但类似的错误:

^{pr2}$

Tags: installpygnubuildcreatingincludelinuxlib

热门问题