当前位置:网站首页>Scrapy shell出现的一个错误
Scrapy shell出现的一个错误
2022-07-26 10:52:00 【ha_lee】
Scrapy shell出现的一个错误:TypeError: init() got an unexpected keyword argument ‘inputhook’
我是在默认的环境下安装的scrapy包,一开始使用pip安装会出现需要vc++14的环境,嫌麻烦就使用Anaconda来安装,一路畅通无阻,唯一缺点是安装慢,需要添加镜像源(网上有,这里不详细说)。
在使用scrapy shell url 命令时就出现了该错误,网上基本没有找到解决的方法,就决定重新安装scrapy包。
重新安装的时候,由于担心python版本会有影响,于是用anaconda创建了一个虚拟环境,创建的过程如下:
1、创建虚拟环境(这里创建了3.7)
conda create -n 环境名 python=3.7
2、激活虚拟环境
activate 环境名
3、给虚拟环境安装外部包
conda install 包名
然后在创建的虚拟环境中安装Scrapy:
conda install Scrapy

完美解决!
所以解决的办法就是新建一个虚拟环境重新安装scrapy包!
接着将这个安装好scrapy包的虚拟环境导入pycharm中,就可以直接运行Scrapy项目了!
导入过程:


然后就可以在pycharm中愉快的使用scrapy包了!!!
边栏推荐
- 232. Implement queue with stack
- WinPcap packet capturing function pcap_ Loop (), stop the problem
- ESXi6.5补丁更新
- MultipartFil转为File
- 菜鸟看源码之LinkedBlockingQueue
- Wechat official account development obtains openid times error 40029 invalid code solution
- 为什么需要自动化测试?软件测试师带你测评不同软件测试工具
- A method to deal with the crash of C Halcon user control
- mysql学习笔记
- pytest conftest.py和fixture的配合使用
猜你喜欢
随机推荐
@The difference and use of jsonformat and @datetimeformat
雨课堂 《知识产权法》笔记
Why do I need automated testing? Software testers take you to evaluate different software testing tools
Kali view IP address
为什么需要自动化测试?软件测试师带你测评不同软件测试工具
SparseArray of the source code for novices
During the interview, how did the interviewer evaluate the level of rust engineers?
Logging advanced use
pytest 前后置方法
MySQL quicklearn-2021-09-01
MFC多线程的简单使用
BigDecimal's addition, subtraction, multiplication and division, size comparison, rounding up and down, and BigDecimal's set accumulation, judge whether BigDecimal has decimal
27.移除元素
Solve the problem of the popularity of org.apache.commons.codec.binary.base64
C#委托与匿名方法浅析
pytest pytest. Ini configuration case grouping case skipping
Bash shell学习笔记(二)
菜鸟看源码之SparseArray
Bash shell学习笔记(一)
What are the biz layer and manager layer in the company project









