Command "d:\python3.7\python.exe -u -c "import setuptools, tokenize;__file__='

本文提供了一种解决在Windows环境下安装Scrapy时遇到Twisted安装部分错误的方法。通过从特定网站下载与Python版本和系统位数相匹配的Twisted轮子文件,并使用pip命令进行安装,之后再安装Scrapy,可以有效解决此问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

安装scrapy报错,在Twisted安装部分

解决方案

通过在https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted,然后下载:

CP后是python 版本,32或者64是windows版本

我使用的Python3.7,win7 64位,win+r,cmd,跳转文件保存目录下执行 

pip install Twisted‑18.9.0‑cp37‑cp37m‑win_amd64.whl

成功后继续pip install scrapy即可

C:\Users\SZUT>pip3 install opencv-contrib-python -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com Collecting opencv-contrib-python Downloading http://mirrors.aliyun.com/pypi/packages/ef/51/3ceb85ecff5f26994b7aae2922b1aa38148dbfe88cab13d63bc6facbac88/opencv-contrib-python-4.11.0.86.tar.gz (150.6MB) 100% |████████████████████████████████| 150.6MB 6.6MB/s Requirement already satisfied: numpy>=1.13.3 in c:\users\szut\appdata\local\programs\python\python36\lib\site-packages (from opencv-contrib-python) Building wheels for collected packages: opencv-contrib-python Running setup.py bdist_wheel for opencv-contrib-python ... error Complete output from command c:\users\szut\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\SZUT\\AppData\\Local\\Temp\\pip-build-ewyk_w3w\\opencv-contrib-python\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\SZUT\AppData\Local\Temp\tmpr4tloixopip-wheel- --python-tag cp36: Traceback (most recent call last): File "c:\users\szut\appdata\local\programs\python\python36\lib\site-packages\skbuild\setuptools_wrap.py", line 613, in setup cmkr = cmaker.CMaker(cmake_executable) File "c:\users\szut\appdata\local\programs\python\python36\lib\site-packages\skbuild\cmaker.py", line 146, in __init__ self.cmake_version = get_cmake_version(self.cmake_executable) File "c:\users\szut\appdata\local\programs\python\python36\lib\site-packages\skbuild\cmaker.py", line 103, in get_cmake_version ) from err Problem with the CMake installation, aborting build. CMake executable is cmake ---------------------------------------- Failed building wheel for opencv-contrib-python Running setup.py clean for opencv-contrib-python Failed to build opencv-contrib-python Installing collected packages: opencv-contrib-python Running setup.
03-23
评论 13
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值