安装加密的问题

时间:2015-10-04 16:27:56

标签: python cryptography install

所以当我尝试通过

安装加密时
python -m pip install cryptography

我收到两条错误消息:

  
      
  1. 加密构建轮失败
  2.   
  3. command" / usr / local / bin / python -c" import setuptools,tokenize; file =' / private / var / folders / qf / 57zhxjfn4hl95y8xg7l12xpm0000gn /T/pip-build-DBR7_Y/cryptography/setup.py';exec(compile(getattr(tokenize,' open',open)( file )。read( ).replace(' \ r \ n',' \ n'),文件,' exec'))" install --record /var/folders/qf/57zhxjfn4hl95y8xg7l12xpm0000gn/T/pip-msQ3gT-record/install-record.txt --single-version-external-managed --compile"在/ private / var / folders / qf / 57zhxjfn4hl95y8xg7l12xpm0000gn / T / pip-build-DBR7_Y / cryptography中错误代码1失败
  4.   

有关如何解决此问题的任何想法?

3 个答案:

答案 0 :(得分:0)

与您在其他帖子Trouble with running pip install

中一样

使用sudo

运行相同的命令

答案 1 :(得分:0)

可能是您的网络上的依赖,您可以先安装它们 在我的情况下,它取决于idna,enum34,ipaddress,pycparser,所以

 pip install idna enum34 ipaddress pycparser

然后安装加密

`pip install cryptography`

如何了解加密的依赖? 密码学的依赖取决于系统环境,当它挂起时,你可以找到这样的日志,第一行是它的依赖。

Installing collected packages: cryptography, idna, enum34, ipaddress, pycparser
Running setup.py install for cryptography
warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
warning: no previously-included files matching 'lextab.*' found under directory 'tests'
warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
warning: no previously-included files matching 'lextab.*' found under directory 'examples'
zip_safe flag not set; analyzing archive contents...

答案 2 :(得分:0)

就我而言,我正在运行旧版本的pip,收到此错误消息:

You are using pip version 7.1.0, however version 8.1.1 is available.

您应该考虑通过'pip install --upgrade pip'命令进行升级。

我只是更新到最新版本,我没有遇到任何问题:

pip install --upgrade pip
相关问题