tox -e py27报错

ubuntu 18.04上,在一个openstack项目中执行tox -e py27

报错:

Running setup.py bdist_wheel for cryptography: started
Running setup.py bdist_wheel for cryptography: finished with status 'error'
Complete output from command /home/wanghongtao/easystack/code/easystack-code/dr-dashboard/.tox/py27/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-iX7pmh/cryptography/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/pip-wheel-9e1FFL --python-tag cp27:

...

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

 

 

解决方案:

1.sudo apt-get install python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev

第一步搞完,发现执行tox -e py27还是报cryptograhpy,这时候执行第二步。

2.sudo apt install libssl1.0

参考:https://stackoverflow.com/questions/22073516/failed-to-install-python-cryptography-package-with-pip-and-setup-py/39457962 

posted on 2019-07-26 12:18  sosogengdongni  阅读(238)  评论(0编辑  收藏  举报

导航