安装pycrypto出现“fatal error: Python.h: No such file or directory”错误

版权声明:本文为博主原创文章,转载请注明出处。 https://blog.csdn.net/wangtaoking1/article/details/51554983

问题


Python pycrypto是python的一个加密解密工具包,我在实际安装的过程出现了”fatal error: Python.h: No such file or directory”错误,使用pip或者源码安装均出现同样的错误。

解决方案


是缺少python-dev包导致的问题。安装这个包即可,注意,如果使用的是python 2,则直接安装python-dev,如果使用的python 3,则安装python3-dev。

# apt-get install python3-dev

猜你喜欢

转载自blog.csdn.net/wangtaoking1/article/details/51554983