安装wxpython的时候报错,输入的是pip install -U wxPython
Collecting wxPython
Using cached wxPython-4.2.0.tar.gz (71.0 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
Traceback (most recent call last):
File "" , line 2, in
File "" , line 34, in
File "/private/var/folders/cd/qm8n6jsx5x3fzd6bzgq57v6h0000gn/T/pip-install-ik56dukb/wxpython_890a9e8d05fa470b8e2690625cbf4961/setup.py", line 27, in
from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
File "/private/var/folders/cd/qm8n6jsx5x3fzd6bzgq57v6h0000gn/T/pip-install-ik56dukb/wxpython_890a9e8d05fa470b8e2690625cbf4961/buildtools/config.py", line 30, in
from attrdict import AttrDict
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/attrdict/__init__.py", line 5, in
from attrdict.mapping import AttrMap
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/attrdict/mapping.py", line 4, in
from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/collections/__init__.py)
[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.