win10平台 安装Scrapy遇到一些问题
1.本来使用命令
pip install scrapy
2.然而我安装了py2.X 和 py3.X 版本所有,所以使用该命会报错,所以使用命令:(我python3 为默认版本,py2名称为python2)
python -m pip install scrapy
3.安装失败提示:
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
4.好吧,继续安装visual c++ 14.0
安装地址:https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads ,找到最新的版本就可以,安装后需要重启。
5.再次使用命令安装scripy
python -m pip install scrapy
6.继续报错
报同样的错误,但是我发现 twisted 这个模块模块一直在报错,可以还需要这个模块。
6.安装twisted,找到自己合适的版本:
下载地址:https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
C:\Users\XXX>python -m pip install G:\Downloads\Twisted-18.7.0-cp36-cp36m-win32.whl
文件所在的路径 G:\Downloads\Twisted-18.7.0-cp36-cp36m-win32.whl
我电脑是64位的,但是的64位的安装失败,32位安装成功,所以32/64都下下来试试。
7.所有操作都完成后,使用命令
python -m pip install scrapy
看到安装成功提示。