Scrapy Installation (Microsoft Visual C++ 14.0 is required)

戏子无情 提交于 2020-05-30 19:15:26

问题


I have been trying to install scrapy for days now through the command, pip install scrapy.

After downloading the requirements, I am getting this error code.

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\pancore builders\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\PANCORE BUILDERS\\AppData\\Local\\Temp\\pip-install-h2e9etct\\Twisted\\setup.py'"'"'; __file__='"'"'C:\\Users\\PANCORE BUILDERS\\AppData\\Local\\Temp\\pip-install-h2e9etct\\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\PANCORE BUILDERS\AppData\Local\Temp\pip-record-3qfphtaw\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\pancore builders\appdata\local\programs\python\python38\Include\Twisted' Check the logs for full command output.

I read about installing Visual Code by Microsoft, but even then it is still not working for me.

What could be the problem?


回答1:


The error says everything. You have to download Microsoft Visual C++ Build Tools for get rid of from this error. You can download this from here. There is no need to download visual studio for this.

After the installation, you must restart your system. After that you can install your library.

If you are using python3.x version, run this code

pip3 install scrapy

If you are using python2.x version, run this code

pip install scrapy



回答2:


According to scrapy docs recommended way install scrapy on windows and the only reliable way to avoid issues with pip intalled scrapy - usage of conda python distribution

Installing Microsoft Visual C++ Build tools - doens't guarantee that It solve this issues (works differently depending on windows version, and version of Microsoft Visual C++)



来源:https://stackoverflow.com/questions/61538540/scrapy-installation-microsoft-visual-c-14-0-is-required

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!