安装scrapy成功后在cmd下输入scrapy指令时,如果报如题的错,可能是因为环境变量未配置,但为了便于观察,可以通过卸载重新安装来复现明文报错信息。
1.cmd命令下输入:pip uninstall scrapy卸载
2.弹出proceed(y/n)?输入y回车
卸载成功会出现successfully uninstall scrapy-2.51。
3.重新安装pip install scrapy,安装结束时会有黄字提醒。
WARNING: The script scrapy.exe is installed in 'C:\Users\dell\AppData\Roaming\Python\Python36\Scripts' which is not on PATH
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed scrapy-2.3.0
4.将提示的路径加入到环境变量。