安装scrapy报错failed with error code 1 in C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-dvrc8k5o\Twis

安装scrapy的时候报错failed with error code 1 in C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-dvrc8k5o\Twisted
安装scrapy报错failed with error code 1 in C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-dvrc8k5o\Twis_第1张图片首先报错提示“ error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools”: http://landinghub.visualstudio.com/visual-cpp-build-tools”,此时我先尝试安装Microsoft Visual C++ 14.0 ,直接去官网上下载即可:https://www.microsoft.com/zh-CN/download/details.aspx?id=52685

安装Microsoft Visual C++ 14.0后还是提示报错
安装scrapy报错failed with error code 1 in C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-dvrc8k5o\Twis_第2张图片此时根据提示应该是没有安装Twisted
这里去官网上下载Twisted文件:https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
安装scrapy报错failed with error code 1 in C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-dvrc8k5o\Twis_第3张图片
cp后面是python版本号,根据你自己系统安装的python版本进行相应下载即可。
下载完成后用命令行cmd进入你下载的twisted文件所在文件夹,执行操作:pip install Twisted-18.9.0-cp36-cp36m-win_amd64.whl
安装scrapy报错failed with error code 1 in C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-dvrc8k5o\Twis_第4张图片提示:Successfully installed Twisted-18.9.0
然后再执行安装:pip install scrapy
安装scrapy报错failed with error code 1 in C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-dvrc8k5o\Twis_第5张图片至此成功安装scrapy。

你可能感兴趣的:(日常练习)