我目前正在用Python实现自动化,但是当我尝试安装一些练习所需的第三方模块时,我遇到了一些问题。
我正在按照附录A书上提供的说明
当试图安装imapclient模块时,我会收到以下错误消息:
Command
"/home/peksi/Documents/python3/projects/environments/automation/bin/python3
-u -c "import setuptools, tokenize;__file__='/tmp/pip-build-cnal9syj/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, __file__, 'exec'))" install
--record /tmp/pip-0oxau5ge-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/peksi/Documents/python3/projects/environments/automation/include/site/python3.5/cryptography"
failed with error code 1 in /tmp/pip-build-cnal9syj/cryptography/其余模块的安装没有任何问题。
要成功安装imapclient模块,我应该做什么?
编辑:如果它有助于显示整个终端输出,这里
发布于 2016-12-30 22:35:40
在linux上,您需要确保在cryptography安装之前安装了所有正确的开发头。在您的例子中,通过完整的终端输出,您将丢失openssl头。
请注意,您还需要libffi和它的头。当你在安装它的时候,最好也安装它:
如果您使用的是Debian/Ubuntu发行版:
apt-get install libssl-dev libffi-dev否则,使用您的发行版使用的任何包管理。
https://stackoverflow.com/questions/41401048
复制相似问题