python3 安裝scrapy
Platform: python 3.5, win7
直接安裝scrapy: pip install scrapy 會報錯
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": ht tp://landinghub.visualstudio.com/visual-cpp-build-tools
---------------------------------------- Command "f:\python\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ADMINI~1\\AppD ata\\Local\\TEMP_~1\\pip-install-_go2vfxe\\Twisted\\setup.py';f=getattr(tokenize, 'open', open)(__fi le__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install - -record C:\Users\ADMINI~1\AppData\Local\TEMP_~1\pip-record-oua5i4wu\install-record.txt --single-vers ion-externally-managed --compile" failed with error code 1 in C:\Users\ADMINI~1\AppData\Local\TEMP_~ 1\pip-install-_go2vfxe\Twisted\
安裝scrapy的步驟應該這樣:
1. 下載Virtual c++
其他工具與框架-> Microsoft Visual C++ Redistributable for Visual Studio 2017 下載
然後安裝Exe
2. 下載twisted
注意不要用pip install twisted, 還是會報錯
前往這個頁面,找到適合python版本的,cp後就是接的python版本。還有32位還是64位
3. 控制檯
pip install d:\download\Twisted-18.9.0-cp35-cp35m-win_amd64.whl pip install scrapy
同時我也上傳了以上所需的那些資源包。
Done.
Thanks.