Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
wxPython install error
#1
Complete Rookie, seriously.

I am attempting to install wxPython via pip on my Mac, running Mojave 10.14.6, but it's not working. Any help would be greatly appreciated. I've attached a portion of the terminal output for reference.

Attached Files

.pdf   Terminal Output.pdf (Size: 67.79 KB / Downloads: 171)
Reply
#2
I had some difficulty building on Linux Mint.
The solution on my end was to install attrdict before installing wxpython.
pip install attrdict
After that, no problem.

This may or may not be an issue on Mac
Reply
#3
Larz, this is what I get now:

Collecting attrdict
Downloading attrdict-2.0.1-py2.py3-none-any.whl (9.9 kB)
Requirement already satisfied: six in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from attrdict) (1.16.0)
Installing collected packages: attrdict
Successfully installed attrdict-2.0.1
You have mail in /var/mail/Carlo
MacBook-Pro-2:~ Carlo$ pip install 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 "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/3_/37hpdl9x3b534sjy3w73ft3r0000gn/T/pip-install-qq_tutyz/wxpython_4350046bae5e4aa2a8f712b88e2d0364/setup.py", line 27, in <module>
from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
File "/private/var/folders/3_/37hpdl9x3b534sjy3w73ft3r0000gn/T/pip-install-qq_tutyz/wxpython_4350046bae5e4aa2a8f712b88e2d0364/buildtools/config.py", line 30, in <module>
from attrdict import AttrDict
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/attrdict/__init__.py", line 5, in <module>
from attrdict.mapping import AttrMap
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/attrdict/mapping.py", line 4, in <module>
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.
MacBook-Pro-2:~ Carlo$
Reply
#4
There is issues while using Python 3.11.
Same on Win i did a quick test using Python 3.11 and it fails,Win and Mac use similar pre build wheels.
Works fine on Pyrhon 3.10,so use that for now.
Look at this post to see usage of pyenv which let you easly switch to Pythnon 3.10.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Install error middlestudent 1 751 Sep-23-2023, 08:26 AM
Last Post: middlestudent
  Error with pip install coffeeguy 1 2,271 Sep-08-2022, 01:27 AM
Last Post: snippsat
  kmeans install error (please help me) muratuzun 3 5,472 May-06-2022, 02:14 PM
Last Post: snippsat
  Install any library via pip get an error cannot import name 'SCHEME_KEYS' from 'pip. Anldra12 2 10,604 Jan-04-2022, 01:05 PM
Last Post: Anldra12
  Anaconda pip install mpyc Error pip-script.py is not present Anldra12 2 7,800 Dec-13-2021, 06:59 PM
Last Post: Anldra12
  Minecraft Python install error SomeAcandKid 1 2,340 Oct-06-2021, 06:22 PM
Last Post: Ronhamas
  Installed pip install openpyxl, Requirement already satisfied, but, still have error jonah88888 3 6,602 Sep-24-2021, 02:11 AM
Last Post: jonah88888
  error trying to install sslstrip NullAdmin 1 4,037 Mar-11-2021, 09:37 PM
Last Post: buran
  python setup.py install error blackclover 2 7,891 Jan-07-2021, 04:36 AM
Last Post: blackclover
  trying to pip install stasm module getting error djf123 3 4,485 Jul-26-2020, 05:00 AM
Last Post: millpond

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020