改变原始目录
配置python环境
- 但是第三步输入python还是无法进行交互式环境,还需要配置python环境
D:\works> set PATH=D:\python3
真正原因
- 一定要勾这个选项,本人重新安装的是python 3.10
- 所以再次打开cmd,再输入python,是以下界面
C:\Users\***>python
Python 3.10.3 (tags/v3.10.3:a342a49, Mar 16 2022, 13:07:40) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
- 打开settings-Tools-Terminal,将Shell path 改为图中路径
C:\Windows\System32\WindowsPowerShell\v1.0\powershell
在terminal中输入以下命令(如果不行,可以先pip install scrapy)
PS D:\works\scrapy_fourweeks> scrapy startproject example
New Scrapy project 'example', using template directory 'D:\python3.10\lib\site-packages\scrapy\templates\project', created in:
D:\works\scrapy_fourweeks\example
You can start your first spider with:
cd example
scrapy genspider example example.com
|