|
发表于 2025-10-9 00:09:35
|
显示全部楼层
为什么我在cmd 中下载这个opencv 会变成这样
Microsoft Windows [版本 10.0.26100.6584]
(c) Microsoft Corporation。保留所有权利。
C:\Users\Doraemon>python -m pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting opencv-python
Downloading https://pypi.tuna.tsinghua.edu.c ... -abi3-win_amd64.whl (39.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 39.0/39.0 MB 24.5 MB/s 0:00:01
Collecting numpy<2.3.0,>=2 (from opencv-python)
Downloading https://pypi.tuna.tsinghua.edu.c ... /numpy-2.2.6.tar.gz (20.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 20.3/20.3 MB 24.2 MB/s 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
+ C:\Users\Doraemon\AppData\Local\Programs\Python\Python314\python.exe C:\Users\Doraemon\AppData\Local\Temp\pip-install-bwb3wnxv\numpy_102e17144c4a47e5abd7969277d079ba\vendored-meson\meson\meson.py setup C:\Users\Doraemon\AppData\Local\Temp\pip-install-bwb3wnxv\numpy_102e17144c4a47e5abd7969277d079ba C:\Users\Doraemon\AppData\Local\Temp\pip-install-bwb3wnxv\numpy_102e17144c4a47e5abd7969277d079ba\.mesonpy-cv6pugrl -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\Doraemon\AppData\Local\Temp\pip-install-bwb3wnxv\numpy_102e17144c4a47e5abd7969277d079ba\.mesonpy-cv6pugrl\meson-python-native-file.ini
The Meson build system
Version: 1.5.2
Source dir: C:\Users\Doraemon\AppData\Local\Temp\pip-install-bwb3wnxv\numpy_102e17144c4a47e5abd7969277d079ba
Build dir: C:\Users\Doraemon\AppData\Local\Temp\pip-install-bwb3wnxv\numpy_102e17144c4a47e5abd7969277d079ba\.mesonpy-cv6pugrl
Build type: native build
Project name: NumPy
Project version: 2.2.6
WARNING: Failed to activate VS environment: Could not find C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
..\meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']]
The following exception(s) were encountered:
Running `icl ""` gave "[WinError 2] 系统找不到指定的文件。"
Running `cl /?` gave "[WinError 2] 系统找不到指定的文件。"
Running `cc --version` gave "[WinError 2] 系统找不到指定的文件。"
Running `gcc --version` gave "[WinError 2] 系统找不到指定的文件。"
Running `clang --version` gave "[WinError 2] 系统找不到指定的文件。"
Running `clang-cl /?` gave "[WinError 2] 系统找不到指定的文件。"
Running `pgcc --version` gave "[WinError 2] 系统找不到指定的文件。"
A full log can be found at C:\Users\Doraemon\AppData\Local\Temp\pip-install-bwb3wnxv\numpy_102e17144c4a47e5abd7969277d079ba\.mesonpy-cv6pugrl\meson-logs\meson-log.txt
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
C:\Users\Doraemon>python -m pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple |
|