python - 如何在 Windows 上的可视化代码中为 python 安装 scrapy?
问题描述
我想用可视化代码中的python进行开发,如何在windows上的可视化代码中安装scrapy for python?
import scrapy
class SafetyCaseItem(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
casetitle = scrapy.Field()
casetype = scrapy.Field()
posttime = scrapy.Field()
caseurl = scrapy.Field()
description = scrapy.Field()
casecontent = scrapy.Field()
ipage = scrapy.Field()
nextlink = scrapy.Field()
解决方案
首先打开你的命令提示符;
然后转到您的当前目录;
cd path_of_your_folder
cd
表示选择目录。
然后运行这个命令;
pip install scrapy
这就对了。你现在准备好了。
例如,如果您的项目目录是 my_project 并且位于该Users/your_username_on_your_computer
目录内,那么在您的命令提示符下(您将在该C:/Users/your_username_on_your_computer
位置),键入;
cd my_project
然后按回车。
现在您位于要使用scrapy 的my_project 目录中。
所以现在在你的命令提示符下运行这个命令;
pip install scrapy
你现在完成了。开始写一些代码。
推荐阅读
- python-3.x - Python问题:如何添加每行的值
- r - 在 r 中的循环内引用具有几乎相同名称的数据框的列
- r - 在 geom_jitter() 中指定点大小不会改变所有点
- javascript - 为什么在加载页面时不会首先显示第一张图片?我的 JavaScript 有什么问题?
- css - Bootstrap 5 - 将单选按钮内联和单选输入组并排放置
- javascript - 打字稿别名:找不到模块
- google-apps-script - 有没有办法通过谷歌应用脚本比较两张联系人照片?
- reactjs - 通过引用或值来反应状态变量赋值?
- latex - 在 Latex 中缩进段落的每一行?
- c# - 唤醒方法未启动