scrapy 安装

yum install libffi libffi-devel
. 无法连接python https服务器

打开防火墙iptables 443端口

2. No package 'libffi' found - fatal error: ffi.h: No such file or directory

yum install libffi libffi-devel

3. pip install lxml error:xslt-config: not found

yum install libxslt-devel libxml2-devel python-devel

4. No module named pkg_resources

curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py --insecure | python2.7

上述 --insecure参数可以避免curl进行SSL认证校验



另外CentOS6.2默认安装的Python2.6版本,可以把python2.7安装到/usr/local/下面:

./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"

你可能感兴趣的:(scrapy)