运行Scrapy一开始说我
Unable to find vcvarsall.bat
于是安装wheel
pip install wheel
更新模块的方法 以 requests为例
pip install -U requests
查看安装的模块和版本 pip list 这一点可以用来排除错误,心里有数
后来却扫Twisted 直接pip install 不可以,因为有好多版本,必须下载合适的版本
找到合适的版本,下载,放到合适位置
然后在该目录下面 Shift 右键启动命令行 pip install XXXXXXXXXXXXX.whl
然后 所我service_identify有问题,我重新安装这货到最新版本,不行,然后我用pip list确定是最新版本了
然后我看了这个帖子
https://www.jianshu.com/p/e28dd78b7214
运行程序时报出了如下警告,
:0: UserWarning: You do not have a working installation of the service_identity
module: 'No module named service_identity'. Please install it from <https://pyp
i.python.org/pypi/service_identity> and make sure all of its dependencies are sa
tisfied. Without the service_identity module and a recent enough pyOpenSSL to s
upport it, Twisted can perform only rudimentary TLS client hostname verification
. Many valid certificate/hostname mappings may be rejected.
从字面意思就是说缺少service_identity
模块。
好吧 安装一下试试:
pip install service_identity
提示:
Requirement already satisfied
....:)
Stack Overflow上有类似问题
- https://stackoverflow.com/questions/24089484/python-no-module-named-service-identity
- https://stackoverflow.com/questions/23959336/scrapy-install-version-error
但是都是安装service_identity
模块。尴尬。
仔细研究了一下之前的提示信息: 提到
make sure all of its dependencies are sa tisfied.
去service_identity
的文档里找找看。 存在几个依赖包.
逐一安装试试,发现果然缺少了一个依赖pyasn1-modules
.
我依次
pip install attrs
"""
scrapy: ‘module’ object has no attribute ‘OP_SINGLE_ECDH_USE’错误解决方法
这个问题出在你的ubuntu安装的pyopenssl和本机的openssl出现版本差异所致。
问题解决方法:
运行 sudo apt-get install libssl-dev
pip install pyopenssl –upgrade
---------------------
原文:https://blog.csdn.net/syh_486_007/article/details/71600514
""
至此运行scrapy遇到的问题全部解决,中心思想就是什么 出错就重装什么,配合搜索,更加聪明的使用关键词。
有些帖子忘了引用链接了,失敬失敬。