昨晚在Win10尝试安装scrapy的时候,遇到了很多问题。以前都是在linux下完成,倒是没觉得有这么多问题。
pip install -U scrapy pillow
1.Couldn’t find index page for ‘incremental’ (maybe misspelled?)
解决:pip install –upgrade setuptools
2.安装twisted时,报错如下:error: command ‘cl.exe’ failed: No such file or directory(twisted)
未解决:我查了很多资料,cl.exe is the Microsoft C/C++ compiler (included in MS Visual C++ / MS Visual Studio.)
我把C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin 和
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE添加进PATH。
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib;
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10150.0\ucrt\x86;
C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86添加到LIB
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt添加到INCLUDE
好了,以上都是废话。又不成功。
接下来,我们说用PyCharm成功安装Scrapy。
1.打开PyCharm的Settings
2.在Settings中找到Project Interpreter,
5.最后,安装成功
pip freeze