由于云服务器上的环境只配有python3.5,所以一直安装不上依赖pysftp,提示pip.exceptions.InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/cryptography,真的是找了好多方法,好多坑!!!
最后终于解决了办法是:个人估计pysftp是用python2.7写的,导致用python3的环境去安装一直出现错误。
so 最关键的一步就是:sudo apt-get install python2.7
还是有坑啊!!!
最后
第一个错误:Failed building wheel for cryptography
最后提示错误:Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-bv69kwrp/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-q3yk2iio-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-bv69kwrp/cryptography/
解决办法:sudo apt-getinstallbuild-essential libssl-dev libffi-dev python-dev
网友评论