scrapy稳妥安装或重装
**scrapy稳妥安装或重装**问题描述:python35不再维护,所以使用的python35的话,安装scrapy极度不稳,最好更新python首先安装twisted再安装scrapy若遇Could not build wheels for cryptography which use PEP 517 and cannot be installed directly则需要更新pip才能无误安装
**
scrapy稳妥安装或重装
**
问题描述:
python35不再维护,所以使用的python35的话,安装scrapy极度不稳,最好更新python
首先安装twisted
再安装scrapy
若遇
Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
则需要更新pip才能无误安装
使用:
scrapy startproject ArticleSpider
cd ArticleSpider
scrapy genspider 爬虫名 要爬的域名
**以下是老版本安装scrapy的一些老骨头和尝试:**
scrapy genspider 爬虫名 要爬的域名出现问题
ImportError: No module named '_cffi_backend'
可以尝试安装cffi包,使用pip3安装cryptography和cffi。
pip install cryptography
pip install cffi
一种尝试是:
在Scripts目录下genspider再放到里面去,但是后来我发现,这genspider出来的会缺少主文件,不妥
第二个就是:
需要导入cffi,lib
然后重点是这个lib
会在自己本身python的各包位置中,需要复制进你想要创建scrapy的文件夹中,cffi亦是如此
然后这个文件夹中可能也有Lib,而且复制进去,会提示Lib和lib文件名一致,所以直接统一合并,并且再把文件名改成lib,之后就可以了
还有难受的是这个报错:
CryptographyDeprecationWarning: Python 3.5 support will be dropped in the next release of cryptography. Please upgrade your Python.
from cryptography import utils, x509
我跟踪是这个包里面导入不了
from cryptography.hazmat.bindings._openssl import ffi, lib
有问题
发现是_openssl.pdy,不知是我的问题还是。。。。
更多推荐
所有评论(0)