安装scrapy时报以下错误
-----------------------------------
Failed building wheel for Twisted
···
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 "e:\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\SHANGH~1\\AppData\\Local\\Temp\\pip-install-naxodfqj\\Twisted\\setup.py';f=geta
ttr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\SHANGH~1\AppData\Lo
cal\Temp\pip-record-uqosqiff\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\SHANGH~1\AppData\Local\Temp\pip-inst
all-naxodfqj\Twisted\
首先在https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted这个网址上找到twisted,点击进入后就会出现你要下载的twisted版本
找到对应的版本就可以,cp27/34/35/36/37代表python版本,win32是32位的,win_amd64是64位
下载好之后进入到下载twisted的文件夹,pip install 文件名
出现Successfully installed Twisted-18.9.0表示安装成功
再pip install scrapy就可以安装成功了
网友评论