由于云服務(wù)器上的環(huán)境只配有python3.5渠脉,所以一直安裝不上依賴pysftp,提示pip.exceptions.InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/cryptography塞茅,真的是找了好多方法堵幽,好多坑W喝ァH砩唷羽圃!
最后終于解決了辦法是:個(gè)人估計(jì)pysftp是用python2.7寫的欢搜,導(dǎo)致用python3的環(huán)境去安裝一直出現(xiàn)錯(cuò)誤封豪。
so 最關(guān)鍵的一步就是:sudo apt-get install python2.7
還是有坑啊?癯病3琶!
最后
第一個(gè)錯(cuò)誤:Failed building wheel for cryptography
最后提示錯(cuò)誤: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