首页 > 解决方案 > 安装scrapy时出现安装错误

问题描述

我的系统是windows 8.1,安装了python 3.7.2。现在,每当我尝试安装 -> pip install scrapy

它总是向我显示下面提到的错误:

error: [WinError 3] The system cannot find the path specified: 'C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v8.1\\lib'

----------------------------------------
Command "c:\users\user\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-5lpvl9q3\\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\User\AppData\Local\Temp\pip-record-5pmlq_y_\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\User\AppData\Local\Temp\pip-install-5lpvl9q3\Twisted\

感谢帮助!

标签: pythonpython-3.xwindows-8.1

解决方案


拳头,你可以尝试升级setuptools再试一次。(您没有指定仅 Scrapy 或您尝试安装的所有其他东西有问题吗?)

python -m pip install --upgrade pip setuptools wheel

我的建议是在 Windows 上使用虚拟环境或conda

就是这样:

https://doc.scrapy.org/en/latest/intro/install.html#windows


推荐阅读