Python安装scrapy提示 error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++

时间:2021-11-24 09:28:11

进入该网址http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted

下载twisted对应版本的whl文件

,cp后面是python版本,amd64代表64位

运行 pip install  D:\Twisted-18.9.0-cp37-cp37m-win_amd64.whl

C:\Windows\system32>pip install D:\Twisted-18.9.0-cp37-cp37m-win_amd64.whl
Twisted-18.9.0-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform. C:\Windows\system32>pip install D:\Twisted-18.9.0-cp37-cp37m-win_amd64.whl
Twisted-18.9.0-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform. C:\Windows\system32>pip install D:\Twisted-18.9.0-cp37-cp37m-win32.whl
Processing d:\twisted-18.9.0-cp37-cp37m-win32.whl
Requirement already satisfied: zope.interface>=4.4.2 in d:\python3.7.2\lib\site-packages (from Twisted==18.9.0) (4.6.0)
Requirement already satisfied: constantly>=15.1 in d:\python3.7.2\lib\site-packages (from Twisted==18.9.0) (15.1.0)
Requirement already satisfied: attrs>=17.4.0 in d:\python3.7.2\lib\site-packages (from Twisted==18.9.0) (19.1.0)
Requirement already satisfied: incremental>=16.10.1 in d:\python3.7.2\lib\site-packages (from Twisted==18.9.0) (17.5.0)
Requirement already satisfied: PyHamcrest>=1.9.0 in d:\python3.7.2\lib\site-packages (from Twisted==18.9.0) (1.9.0)
Requirement already satisfied: hyperlink>=17.1.1 in d:\python3.7.2\lib\site-packages (from Twisted==18.9.0) (18.0.0)
Requirement already satisfied: Automat>=0.3.0 in d:\python3.7.2\lib\site-packages (from Twisted==18.9.0) (0.7.0)
Requirement already satisfied: setuptools in d:\python3.7.2\lib\site-packages (from zope.interface>=4.4.2->Twisted==18.9.0) (40.6.2)
Requirement already satisfied: six in d:\python3.7.2\lib\site-packages (from PyHamcrest>=1.9.0->Twisted==18.9.0) (1.12.0)
Requirement already satisfied: idna>=2.5 in d:\python3.7.2\lib\site-packages (from hyperlink>=17.1.1->Twisted==18.9.0) (2.8)
Installing collected packages: Twisted
Successfully installed Twisted-18.9.0

电脑是64位的但是就是安装不上Twisted-18.9.0-cp37-cp37m-win_amd64.whl,结果把32位Twisted-18.9.0-cp37-cp37m-win32.whl安装上了。很奇怪不知道为啥,搞了一下午也没有弄明白。

装完32位Twisted-18.9.0-cp37-cp37m-win32.whl,重新输入pip install scrapy即可

C:\Windows\system32>pip install scrapy
Collecting scrapy
Using cached https://files.pythonhosted.org/packages/3e/45/414e87ac8209d537c91575538c5307c20217a6943f555e0ee39f6db4bb0f/Scrapy-1.6.0-py2.py3-none-any.whl
Requirement already satisfied: service-identity in d:\python3.7.2\lib\site-packages (from scrapy) (18.1.0)
Requirement already satisfied: parsel>=1.5 in d:\python3.7.2\lib\site-packages (from scrapy) (1.5.1)
Requirement already satisfied: PyDispatcher>=2.0.5 in d:\python3.7.2\lib\site-packages (from scrapy) (2.0.5)
Requirement already satisfied: cssselect>=0.9 in d:\python3.7.2\lib\site-packages (from scrapy) (1.0.3)
Requirement already satisfied: lxml in d:\python3.7.2\lib\site-packages (from scrapy) (4.3.2)
Requirement already satisfied: six>=1.5.2 in d:\python3.7.2\lib\site-packages (from scrapy) (1.12.0)
Requirement already satisfied: queuelib in d:\python3.7.2\lib\site-packages (from scrapy) (1.5.0)
Requirement already satisfied: pyOpenSSL in d:\python3.7.2\lib\site-packages (from scrapy) (19.0.0)
Requirement already satisfied: Twisted>=13.1.0 in d:\python3.7.2\lib\site-packages (from scrapy) (18.9.0)
Requirement already satisfied: w3lib>=1.17.0 in d:\python3.7.2\lib\site-packages (from scrapy) (1.20.0)
Requirement already satisfied: attrs>=16.0.0 in d:\python3.7.2\lib\site-packages (from service-identity->scrapy) (19.1.0)
Requirement already satisfied: pyasn1-modules in d:\python3.7.2\lib\site-packages (from service-identity->scrapy) (0.2.4)
Requirement already satisfied: cryptography in d:\python3.7.2\lib\site-packages (from service-identity->scrapy) (2.6.1)
Requirement already satisfied: pyasn1 in d:\python3.7.2\lib\site-packages (from service-identity->scrapy) (0.4.5)
Requirement already satisfied: zope.interface>=4.4.2 in d:\python3.7.2\lib\site-packages (from Twisted>=13.1.0->scrapy) (4.6.0)
Requirement already satisfied: PyHamcrest>=1.9.0 in d:\python3.7.2\lib\site-packages (from Twisted>=13.1.0->scrapy) (1.9.0)
Requirement already satisfied: incremental>=16.10.1 in d:\python3.7.2\lib\site-packages (from Twisted>=13.1.0->scrapy) (17.5.0)
Requirement already satisfied: constantly>=15.1 in d:\python3.7.2\lib\site-packages (from Twisted>=13.1.0->scrapy) (15.1.0)
Requirement already satisfied: hyperlink>=17.1.1 in d:\python3.7.2\lib\site-packages (from Twisted>=13.1.0->scrapy) (18.0.0)
Requirement already satisfied: Automat>=0.3.0 in d:\python3.7.2\lib\site-packages (from Twisted>=13.1.0->scrapy) (0.7.0)
Requirement already satisfied: cffi!=1.11.3,>=1.8 in d:\python3.7.2\lib\site-packages (from cryptography->service-identity->scrapy) (1.12.2)
Requirement already satisfied: asn1crypto>=0.21.0 in d:\python3.7.2\lib\site-packages (from cryptography->service-identity->scrapy) (0.24.0)
Requirement already satisfied: setuptools in d:\python3.7.2\lib\site-packages (from zope.interface>=4.4.2->Twisted>=13.1.0->scrapy) (40.6.2)
Requirement already satisfied: idna>=2.5 in d:\python3.7.2\lib\site-packages (from hyperlink>=17.1.1->Twisted>=13.1.0->scrapy) (2.8)
Requirement already satisfied: pycparser in d:\python3.7.2\lib\site-packages (from cffi!=1.11.3,>=1.8->cryptography->service-identity->scrapy) (2.19)
Installing collected packages: scrapy
Successfully installed scrapy-1.6.0