简体   繁体   English

错误:pymsgbox 的构建轮失败

[英]ERROR: Failed building wheel for pymsgbox

   Collecting PyAutoGUI
   Using cached PyAutoGUI-0.9.53-py3-none-any.whl
   Collecting python3-Xlib
   Using cached python3_xlib-0.15-py3-none-any.whl
   Collecting mouseinfo
   Using cached MouseInfo-0.1.3-py3-none-any.whl
   Collecting pyscreeze>=0.1.21
   Using cached PyScreeze-0.1.28.tar.gz (25 kB)
   Installing build dependencies ... done
   Getting requirements to build wheel ... done
   Preparing metadata (pyproject.toml) ... done
   Collecting pygetwindow>=0.0.5
   Using cached PyGetWindow-0.0.9-py3-none-any.whl
   Collecting pymsgbox
   Using cached PyMsgBox-1.0.9.tar.gz (18 kB)
   Installing build dependencies ... done
   Getting requirements to build wheel ... done

   Preparing metadata (pyproject.toml) ... done
   Collecting PyTweening>=1.0.1
   Using cached pytweening-1.0.4-py3-none-any.whl
   Collecting pyrect
   Using cached PyRect-0.2.0-py2.py3-none-any.whl
   Requirement already satisfied: pyperclip in /usr/lib/python3/dist-packages (from mouseinfo->PyAutoGUI) (1.8.2)
   Building wheels for collected packages: pyscreeze, pymsgbox
   Building wheel for pyscreeze (pyproject.toml) ... error
   error: subprocess-exited-with-error

   × Building wheel for pyscreeze (pyproject.toml) did not run successfully.

    File "/usr/lib/python3.10/_distutils_system_mod.py", line 137, in wrapped_load_schemes
      _inject_headers(name, scheme)
    File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers
      scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers']
    File "/usr/lib/python3.10/_distutils_system_mod.py", line 135, in wrapped_load_schemes
      schemes = _load_schemes()
    File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py", line 103, in _load_schemes
      sysconfig_schemes = _load_sysconfig_schemes() or {}
    File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py", line 91, in _load_sysconfig_schemes
      with contextlib.suppress(AttributeError):
  RecursionError: maximum recursion depth exceeded
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.注意:此错误源自子进程,可能不是 pip 的问题。

ERROR: Failed building wheel for pymsgbox Failed to build pyscreeze pymsgbox错误:pymsgbox 构建轮失败 pyscreeeze pymsgbox 构建失败
ERROR: Could not build wheels for pyscreeze, pymsgbox, which is required to install pyproject.toml-based projects错误:无法为 pyscreeeze、pymsgbox 构建轮子,这是安装基于 pyproject.toml 的项目所必需的

A quick workaround would be to work on a venv:一个快速的解决方法是在 venv 上工作:


    python -m venv .venv source .venv/bin/activate pip install ...

which works for me.这对我有用。

python -m venv .venv source .venv/bin/activate pip install....

apt install python3.10-venv

I got the same error on my Kali Linux while installing pyautogui.我在安装 pyautogui 时在我的 Kali Linux 上遇到了同样的错误。 It happens when you have an apt installation pending or when installation fails or some other apt-get error.当您有一个 apt 安装挂起或安装失败或其他一些 apt-get 错误时,就会发生这种情况。 To fix this just run要解决这个问题,只需运行

sudo apt --fix-broken install

Now try installing pyautogui again...现在尝试再次安装 pyautogui...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM