我尝试运行“pip3 install numpy”命令,这是输出:
C:\Users\10art\Documents\hello>pip3 install numpy
Collecting numpy
Downloading numpy-1.26.3.tar.gz (15.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.7/15.7 MB 3.9 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> [39 lines of output]
Collecting ninja>=1.8.2
Downloading ninja-1.11.1.1.tar.gz (132 kB)
------------------------------------ 132.4/132.4 kB 601.7 kB/s eta 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: ninja
Building wheel for ninja (pyproject.toml): started
Building wheel for ninja (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
Building wheel for ninja (pyproject.toml) did not run successfully.
exit code: 1
[15 lines of output]
C:\Users\10art\AppData\Local\Temp\pip-build-env-559ptrj_\overlay\lib\python3.11\site-packages\setuptools_scm\git.py:308: UserWarning: git archive did not support describe output
warnings.warn("git archive did not support describe output")
C:\Users\10art\AppData\Local\Temp\pip-build-env-559ptrj_\overlay\lib\python3.11\site-packages\setuptools_scm\git.py:327: UserWarning: unprocessed git archival found (no export subst applied)
warnings.warn("unprocessed git archival found (no export subst applied)")
Traceback (most recent call last):
File "C:\Users\10art\AppData\Local\Temp\pip-build-env-559ptrj_\overlay\lib\python3.11\site-packages\skbuild\setuptools_wrap.py", line 645, in setup
cmkr = cmaker.CMaker(cmake_executable)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\10art\AppData\Local\Temp\pip-build-env-559ptrj_\overlay\lib\python3.11\site-packages\skbuild\cmaker.py", line 148, in __init__
self.cmake_version = get_cmake_version(self.cmake_executable)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\10art\AppData\Local\Temp\pip-build-env-559ptrj_\overlay\lib\python3.11\site-packages\skbuild\cmaker.py", line 105, in get_cmake_version
raise SKBuildError(msg) from err
Problem with the CMake installation, aborting build. CMake executable is cmake
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for ninja
Failed to build ninja
ERROR: Could not build wheels for ninja, which is required to install pyproject.toml-based projects
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
看到有人有类似的问题并运行了以下命令:“pip install -U setuptools”但它没有改变任何东西。也尝试更新python并修复安装,但没有效果。我已经通过 wsl 安装了 python 库和模块,但由于某种原因,命令提示符下没有任何功能。