当前位置:网站首页>ModuleNotFoundError: No module named ‘scrapy‘ 终极解决方式
ModuleNotFoundError: No module named ‘scrapy‘ 终极解决方式
2022-07-05 10:15:00 【senda66】
使用scrapy 命令生成爬虫项目时出现
Traceback (most recent call last):
xxx in <module>
from scrapy.cmdline import execute
ModuleNotFoundError: No module named 'scrapy'
对于上述问题,前段时间还是可以使用的,整体的环境没有动,今天突然就不好用了。搞了好长时间也没解决问题。网上大部分的解决方案也不好用,干脆卸了重装也不好使。后来搜到了一个框架:conda
其官网如下:https://www.anaconda.com/products/distribution
直接下载安装即可。
简介:
Conda是一个开源包和环境管理系统,可以在Windows、macOS和Linux上运行。Conda可以快速安装、运行和更新包及其依赖项。它还可以轻松地创建、保存、加载和在本地计算机上的环境之间切换。它是为Python程序创建的,但它可以为任何语言打包和分发软件。
使用:
基于pycharm CE 。配置项目:在preference中配置Python Interpreter。Python Interpreter。它相当于是一个环境包,项目的环境包可以随意进行切换。
我们可以新建一个环境包。环境中的依赖包我们通过Conda去加载。

python version 可选择3.7 版本的。
环境建好之后 我们可以打开客户端工具 搜索 scrapy 将依赖包和刚刚建的环境关联起来。

应用后可在pycharm 中刷新环境,scrapy框架的依赖包都下载下来了。这时候在项目的跟路径下即可正常运行scrapy 命令了。
总结
此问题出现的原因,有可能是框架环境发生了变化,或者版本差异导致的。
边栏推荐
- How can PostgreSQL CDC set a separate incremental mode, debezium snapshot. mo
- Dedecms website building tutorial
- Glide advanced level
- Glide Mastery
- Completion report of communication software development and Application
- Interview: how does the list duplicate according to the attributes of the object?
- Qt实现json解析
- “军备竞赛”时期的对比学习
- WorkManager学习一
- 微信小程序触底加载与下拉刷新的实现
猜你喜欢

How to write high-quality code?

5g NR system architecture

Today in history: the first e-book came out; The inventor of magnetic stripe card was born; The pioneer of handheld computer was born

ConstraintLayout的流式布局Flow

学习笔记4--高精度地图关键技术(下)

Have you learned to make money in Dingding, enterprise micro and Feishu?

钉钉、企微、飞书学会赚钱了吗?

“军备竞赛”时期的对比学习

Learning II of workmanager

Detailed explanation of the use of staticlayout
随机推荐
QT VT100 parser
Glide conclusion
Ad20 make logo
AtCoder Beginner Contest 258「ABCDEFG」
A large number of virtual anchors in station B were collectively forced to refund: revenue evaporated, but they still owe station B; Jobs was posthumously awarded the U.S. presidential medal of freedo
Excerpt from "sword comes" (VII)
Workmanager Learning one
[paper reading] ckan: collaborative knowledge aware autonomous network for adviser systems
@JsonAdapter注解使用
面试:List 如何根据对象的属性去重?
How to judge that the thread pool has completed all tasks?
Constraintlayout officially provides rounded imagefilterview
小程序中自定义行内左滑按钮,类似于qq和wx消息界面那种
Learning note 4 -- Key Technologies of high-precision map (Part 2)
QT implements JSON parsing
Go项目实战—参数绑定,类型转换
Click the picture in the mobile browser and the picture will not pop up
SLAM 01.人类识别环境&路径的模型建立
DDOS攻击原理,被ddos攻击的现象
想请教一下,十大券商有哪些?在线开户是安全么?