任何人都可以成功“pip install nlg”吗?
当我这样做时,我得到了下面的图片。下面还摘录了错误消息的一些内容。
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for blis
× Encountered error while trying to install package.
╰─> preshed
我已经在 Windows 10 电脑和我的 MacBook 上进行了尝试。上面的图片来自 github codespace 他们的默认图片。
期望 pip 成功安装 nlg 包并且不会在“构建依赖项...”阶段出错
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for blis
Running setup.py clean for blis
Failed to build preshed thinc blis
Installing collected packages: wasabi, plac, cymem, wheel, tqdm, srsly, setuptools, preshed, numpy, murmurhash, Cython, blis, thinc
Running setup.py install for preshed: started
Running setup.py install for preshed: finished with status 'error'
error: subprocess-exited-with-error
× Running setup.py install for preshed did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
running install
running build
running build_py
running build_ext
building 'preshed.maps' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/python/3.10.4/include/python3.10 -I/usr/local/python/3.10.4/include/python3.10 -c preshed/maps.cpp -o build/temp.linux-x86_64-3.10/preshed/maps.o -O3 -Wno-strict-prototypes -Wno-unused-function
gcc: error: preshed/maps.cpp: No such file or directory
gcc: fatal error: no input files
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> preshed
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
[end of output]
注意:此错误源自子进程,并且可能不是 pip 的问题。 错误:子进程退出并出现错误
× 用于安装构建依赖项的 pip 子进程未成功运行。 │ 退出代码:1 ╰─> 输出见上文。
从 3.10 切换到 python 3.7.4 就成功了
谢谢@aab
降级python版本可以解决问题吗?我遇到了这样的事情,请帮忙......(T.T)
我也按照官网的说明进行操作,但还是报错:
C:\Windows\System32>.env\Scripts\activate
(.env) C:\Windows\System32>pip install -U spacy
Collecting spacy
Using cached spacy-3.8.2.tar.gz (1.3 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [102 lines of output]
Ignoring numpy: markers 'python_version < "3.9"' don't match your environment
Collecting setuptools
Using cached setuptools-75.5.0-py3-none-any.whl.metadata (6.8 kB)
Collecting cython<3.0,>=0.25
Using cached Cython-0.29.37-py2.py3-none-any.whl.metadata (3.1 kB)
Collecting cymem<2.1.0,>=2.0.2
Using cached cymem-2.0.8-cp313-cp313-win_amd64.whl
Collecting preshed<3.1.0,>=3.0.2
Using cached preshed-3.0.9.tar.gz (14 kB)
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'
Collecting murmurhash<1.1.0,>=0.28.0
Using cached murmurhash-1.0.10-cp313-cp313-win_amd64.whl
Collecting thinc<8.4.0,>=8.3.0
Using cached thinc-8.3.2.tar.gz (193 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
error: subprocess-exited-with-error
pip subprocess to install build dependencies did not run successfully.
exit code: 1
[64 lines of output]
Ignoring numpy: markers 'python_version < "3.9"' don't match your environment
Collecting setuptools
Using cached setuptools-75.5.0-py3-none-any.whl.metadata (6.8 kB)
Collecting cython<3.0,>=0.25
Using cached Cython-0.29.37-py2.py3-none-any.whl.metadata (3.1 kB)
Collecting murmurhash<1.1.0,>=1.0.2
Using cached murmurhash-1.0.10-cp313-cp313-win_amd64.whl
Collecting cymem<2.1.0,>=2.0.2
Using cached cymem-2.0.8-cp313-cp313-win_amd64.whl
Collecting preshed<3.1.0,>=3.0.2
Using cached preshed-3.0.9.tar.gz (14 kB)
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'
Collecting blis<1.1.0,>=1.0.0
Using cached blis-1.0.1.tar.gz (3.6 MB)
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'
Collecting numpy<2.1.0,>=2.0.0
Using cached numpy-2.0.2.tar.gz (18.9 MB)
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'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
Preparing metadata (pyproject.toml) did not run successfully.
exit code: 1
[12 lines of output]
+ C:\Windows\System32\.env\Scripts\python.exe C:\Users\rjona\AppData\Local\Temp\pip-install-gh2n5sjp\numpy_c0236714f0af4cf395ec83d673a2a867\vendored-meson\meson\meson.py setup C:\Users\rjona\AppData\Local\Temp\pip-install-gh2n5sjp\numpy_c0236714f0af4cf395ec83d673a2a867 C:\Users\rjona\AppData\Local\Temp\pip-install-gh2n5sjp\numpy_c0236714f0af4cf395ec83d673a2a867\.mesonpy-ygxq95jm -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\rjona\AppData\Local\Temp\pip-install-gh2n5sjp\numpy_c0236714f0af4cf395ec83d673a2a867\.mesonpy-ygxq95jm\meson-python-native-file.ini
The Meson build system
Version: 1.4.99
Source dir: C:\Users\rjona\AppData\Local\Temp\pip-install-gh2n5sjp\numpy_c0236714f0af4cf395ec83d673a2a867
Build dir: C:\Users\rjona\AppData\Local\Temp\pip-install-gh2n5sjp\numpy_c0236714f0af4cf395ec83d673a2a867\.mesonpy-ygxq95jm
Build type: native build
Project name: NumPy
Project version: 2.0.2
..\meson.build:1:0: ERROR: Compiler cl cannot compile programs.
A full log can be found at C:\Users\rjona\AppData\Local\Temp\pip-install-gh2n5sjp\numpy_c0236714f0af4cf395ec83d673a2a867\.mesonpy-ygxq95jm\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.
[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 build 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.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
[notice] A new release of pip is available: 24.2 -> 24.3.1
[notice] To update, run: python.exe -m pip install --upgrade pip
error: subprocess-exited-with-error
× pip subprocess to install build 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.
(.env) C:\Windows\System32>