- A+
所属分类:未分类
安装
pyhon是安装的3.7版本,如下:
H:\>python --version Python 3.7.1 H:\r>pip install scrapy
报错如下
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 "c:\users\administrator\appdata\local\programs\python\python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-ga4lkol0\\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\ADMINI~1\AppData\Local\Temp\pip-record-71_osoap\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-ga4lkol0\Twisted\
解决办法
一:去官网下载Microsoft Visual C++ 14.0安装就好了
二:https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted下载twisted对应版本的whl文件Twisted-18.9.0-cp37-cp37m-win_amd64.whl(cp后面是python版本,amd64代表64位,运行)
官网下载太慢了,大家可以从百度网盘搜索下载,下载完成后,执行如下命令:
pip install F:\Twisted-18.7.0-cp37-cp37m-win_amd64.whl
提示如下,则安装成功
Installing collected packages: Twisted Successfully installed Twisted-18.7.0
然后在安装Scrapy,命令如下:
pip install Scrapy
如下提示,则安装成功
Installing collected packages: Scrapy Successfully installed Scrapy-1.5.1
- 安卓客户端下载
- 微信扫一扫
- 微信公众号
- 微信公众号扫一扫