bdist.linux x86 64,Ubuntu-16.04下pip安装module时两个报错的解决

【摘要】操作系统:Ubuntu-16.04,pip安装module时两个报错:Cryptography_HAS_SSL_ST,openssl/opensslv.h: No such file的解决。

错误一提示:

File “build/bdist.linux-x86_64/egg/OpenSSL/__init__.py”, line 8, in File “build/bdist.linux-x86_64/egg/OpenSSL/SSL.py”, line 194, in AttributeError: ‘module’ object has no attribute ‘Cryptography_HAS_SSL_ST’

错误二提示:

creating /tmp/easy_install-EXVhCS/cryptography-2.4.2/.eggs/pycparser-2.19-py2.7.egg

Extracting pycparser-2.19-py2.7.egg to /tmp/easy_install-EXVhCS/cryptography-2.4.2/.eggs

Installed /tmp/easy_install-EXVhCS/cryptography-2.4.2/.eggs/pycparser-2.19-py2.7.egg

/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: ‘python_requires’

warnings.warn(msg)

no previously-included directories found matching ‘docs/_build’

warning: no previously-included files matching ‘*’ found under directory ‘vectors’

build/temp.linux-x86_64-2.7/_openssl.c:498:30: fatal error: openssl/opensslv.h: No such file or directory

compilation terminated.

error: Setup script exited with error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1

还是缺少系统依赖导致,需要安装如下包:

apt-get install libffi-dev

apt-get install libssl-dev

python -m easy_install –upgrade pyOpenSSL

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pymysql

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值