1. 程式人生 > >pip install scrapy報錯

pip install scrapy報錯

環境:python3.6.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  
  
    ----------------------------------------  
Command "f:\software\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\fendo\\AppData\\Local\\Temp\\pip-build-22wlv_wh\\Twisted\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\fendo\AppData\Local\Temp\pip-fywvs_xm-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\29955\AppData\Local\Temp\pip-build-22wlv_wh\Twisted\ 

解決方法:

https://www.lfd.uci.edu/~gohlke/pythonlibs/#pip 

 找到對應的Twisted版本  cp後面是python版本,amd64代表64位

pip install d:Twisted-18.9.0-cp36-cp36m-win_amd64.whl

最後

pip install scrapy

成功