pyconfig.h在"pip安装加密"过程中丢失 [英] pyconfig.h missing during "pip install cryptography"
问题描述
我想按照以下链接设置刮板群集 scrapy-cluster ,在我运行此命令之前一切正常:
I wanna set up scrapy cluster follow this link scrapy-cluster,Everything is ok before I run this command:
pip install -r requirements.txt
requirements.txt如下:
The requirements.txt looks like:
cffi==1.2.1
characteristic==14.3.0
ConcurrentLogHandler>=0.9.1
cryptography==0.9.1
...
我猜上面的命令意味着要在requirements.txt中安装软件包.但是我不希望它指定版本,所以我将其更改为:
I guess the above command means to install packages in requirements.txt.But I don't want it to specify the version,So I change it to this:
cat requirements.txt | while read line; do pip install ${line%%[>=]*} --user;done
在安装加密系统时,它给我错误:
When install cryptography,it gives me the error:
build/temp.linux-x86_64-2.7/_openssl.c:12:24:fatal error:pyconfig.h:No such file or directory
#include <pyconfig.h>
我不知道该如何解决,我尝试了很多方法,但是失败了.我的系统是centos 7,python的版本是2.7.5(默认). 此外,是否还有其他适用于大量网址的刮y框架.预先感谢
I don't know how to solved this , I have tried a lot of methods ,but failed. my system is centos 7, and the version of python is 2.7.5(default). Besides, Is there any other scrapy frame which is appliable for a large number of urls . Thanks in advance
推荐答案
对于Ubuntu,python2
For Ubuntu, python2
apt-get install python-dev
对于Ubuntu,python3
For Ubuntu, python3
apt-get install python3-dev
这篇关于pyconfig.h在"pip安装加密"过程中丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!