I installed wxPython version 4.1.1 from pip3 and my python version is 3.8.9 on a M1 processor running MacOS Monterey.
Importing wx results in the following exception:
Traceback (most recent call last):
File "myPythonProgram.py", line 1, in <module>
import wx
File "/Library/Python/3.8/site-packages/wx/__init__.py", line 17, in <module>
from wx.core import *
File "/Library/Python/3.8/site-packages/wx/core.py", line 12, in <module>
from ._core import *
ImportError: dynamic module does not define module export function (PyInit__core)
I tried the following options but none of the following seemed to have worked and the result in the same exception, stated above:
- Tried wxPython(4.1.1) installation using
pip - python3 -m pip install -U --user wxPython==4.1.1
- Tried wxPython(4.1.2) with
pip3 install -U --user ./wxPython-4.1.2a1.dev5259+d3bdb143-cp38-cp38-macosx_11_0_universal2.whl
- Tried compilation/installation of wxPython from source code
Any hints to resolve the issue?