我想设置scrapy集群按照这个链接scrapy集群,一切都是好的,然后我运行这个命令:
pip install -r requirements.txt
requirements.txt看起来像这样:
cffi==1.2.1
characteristic==14.3.0
ConcurrentLogHandler>=0.9.1
cryptography==0.9.1
...
我猜上面的命令意味着在requirements.txt中安装包。但是我不想让它指定版本,所以我把它改成这样:
cat requirements.txt | while read line; do pip install ${line%%[>=]*} --user;done
在安装加密时,它给出了错误:
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(默认)。另外,有没有其他的零碎的框架,适用于大量的网址。提前感谢
6条答案
按热度按时间d6kp6zgx1#
我自己解决了,对于centos的默认python,在usr/include/python2.7/中只有一个名为pyconfg-64.h的文件,所以运行命令
那就成功了。
dldeef672#
对于Python 3.6,
apt-get install python3.6-dev
和
apt-get install libssl-dev libffi-dev
个krugob8w3#
我在ubuntu上使用python 2,在安装加密时遇到了同样的问题。在我运行此命令后
那就成功了。
qybjjes14#
对于Debian上的Python 3.7,下面的代码对我很有效。
和
您可能还需要:
vvppvyoh5#
在一个基于Debian的发行版(AntiX发行版)上,我还安装了
apt-get install python3-dev
和rust
,成功地完成了pip3 install cryptography
命令。出现提示时(图1),键入1并按键盘上的Enter键。完成后,您必须输入以下命令:
hlswsv356#
对于Ubuntu,python2
对于Ubuntu,python3