0
点赞
收藏
分享

微信扫一扫

Python 使用 scrapy shell 网站 进入命令窗口时候报错 AttributeError: module ‘lib‘ has no attribute


Python 使用 scrapy shell 网站 进入命令窗口时候报错

问题描述——AttributeError: module ‘lib’ has no attribute ‘X509_V_FLAG_CB_ISSUER_CHECK’‘action’ 不是内部或外部命令,也不是可运行的程序或批处理文件。

Python 使用 scrapy shell 网站 进入命令窗口时候报错 AttributeError: module ‘lib‘ has no attribute_解决方法

问题原因

错误分析:主要原因是系统当前的python和pyOpenSSL版本不对应

解决方法

卸载再重装pyOpenSSL

pip uninstall pyOpenSSL
pip install pyOpenSSL

Python 使用 scrapy shell 网站 进入命令窗口时候报错 AttributeError: module ‘lib‘ has no attribute_开发语言_02

Python 使用 scrapy shell 网站 进入命令窗口时候报错 AttributeError: module ‘lib‘ has no attribute_scrapy_03

安装后面使用 scrapy shell 网址 命令 后面还是报错了

报错信息“

AttributeError: module 'OpenSSL.SSL' has no attribute 'SSLv3_METHOD'

Python 使用 scrapy shell 网站 进入命令窗口时候报错 AttributeError: module ‘lib‘ has no attribute_报错解决_04

发现还是 pyOpenSSL 版本问题

测试

测试一下scrapy这个模块版本信息”

输入命令

scrapy version --verbose

Python 使用 scrapy shell 网站 进入命令窗口时候报错 AttributeError: module ‘lib‘ has no attribute_scrapy_05

这个上面是更改后的,为了让scrapy shell 网址 这个命令运行成功不报错

我安装了scrapy 2.5.1 和pyOpenSSL==22.0.0 这个版本

安装命令如下:

pip install pyOpenSSL==22.0.0
pip install scrapy==2.5.1

Python 使用 scrapy shell 网站 进入命令窗口时候报错 AttributeError: module ‘lib‘ has no attribute_解决方法_06

Python 使用 scrapy shell 网站 进入命令窗口时候报错 AttributeError: module ‘lib‘ has no attribute_开发语言_07

运行成功,报错解决了

问题解决


举报

相关推荐

0 条评论