scrapy的安装问题(window10)

1.首先ctrl+R,cmd,打开命令窗口,输入以下指令:

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:\ProgramData\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\gc\\AppData\\Local\\Temp\\pip-build-c4a_58dh\\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\gc\AppData\Local\Temp\pip-ndrih_cv-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\gc\AppData\Local\Temp\pip-build-c4a_58dh\Twisted\


百度了一下,解决的办法如下:

http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted在这个链接下下载相应的文件,下载twisted对应版本的whl文件(如我的Twisted‑17.5.0‑cp36‑cp36m‑win_amd64.whl),cp后面是python版本,amd64代表64位,运行命令如下:

pip install C:\Users\gc\Desktop\Twisted-18.4.0-cp36-cp36m-win_amd64.whl

运行完成后,继续第一步安装Scrapy即可!

如下图:



猜你喜欢

转载自blog.csdn.net/qq_40276310/article/details/80186142