Haze_blue 2025-07-05 20:55 采纳率: 0%
浏览 25

Pyfhel安装失败

Defaulting to user installation because normal site-packages is not writeable
Collecting Pyfhel
Using cached Pyfhel-3.4.2.tar.gz (1.0 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [33 lines of output]
Traceback (most recent call last):
File "C:\Program Files\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 389, in
main()
File "C:\Program Files\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 137, in get_requires_for_build_wheel
backend = _build_backend()
^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 70, in build_backend
obj = import_module(mod_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\importlib_init
.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in load_unlocked
File "", line 999, in exec_module
File "", line 488, in call_with_frames_removed
File "C:\Users\28932\AppData\Local\Temp\pip-build-env-ksv84u2c\overlay\Lib\site-packages\setuptools_init
.py", line 16, in
import setuptools.version
File "C:\Users\28932\AppData\Local\Temp\pip-build-env-ksv84u2c\overlay\Lib\site-packages\setuptools\version.py", line 1, in
import pkg_resources
File "C:\Users\28932\AppData\Local\Temp\pip-build-env-ksv84u2c\overlay\Lib\site-packages\pkg_resources_init
.py", line 2178, in
register_finder(pkgutil.ImpImporter, find_on_path)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
[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: 25.0.1 -> 25.1.1
[notice] To update, run: python.exe -m pip install --upgrade pip
error: subprocess-exited-with-error

× Getting requirements to build wheel 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.

  • 写回答

8条回答 默认 最新

  • 阿里嘎多学长 2025-07-05 20:55
    关注

    阿里嘎多学长整理AIGC生成,因移动端显示问题导致当前答案未能完全显示,请使用PC端查看更加详细的解答过程

    问题解答

    你遇到了 Pyfhel 安装失败的问题,错误信息提示 Defaulting to user installation because normal site-packages is not writeable。这个问题是因为 Python 的站点包目录不可写,因此 Pyfhel 安装失败。

    解决方案:

    1. 使用 pip install --user Pyfhel 命令安装 Pyfhel,这样可以将 Pyfhel 安装到用户目录下,而不是系统目录下。
    2. 如果你想安装到系统目录下,可以使用 sudo pip install Pyfhel 命令,但是需要注意权限问题。

    如果你遇到了其他问题,请提供更多的错误信息和详细的描述,我将尽力帮助你解决问题。

    评论

报告相同问题?

问题事件

  • 创建了问题 7月5日