ubuntu16.04 python3安裝pymysql錯誤
阿新 • • 發佈:2018-12-22
今天在伺服器上搭建開發環境的時候遇到了一問題,就是在python3下安裝pymysql 出現以下問題
1.Failed cleaning build dir for cryptography
2.Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yzhhq2aa/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-399_hd6n-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-yzhhq2aa/cryptography/
原因就是系統缺少依賴包,一個命令裝全解決:
sudo apt-get install python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev