No module named ._core

I just started migrating to python 3.7 and wxpython 4.0.1. I get the error: No module named ‘wx._core’. When I look in the core.py module there is the line: from ._core import *, but I don’t see that module anywhere. Where is the _core module?

It’s a binary extension module, not regular Python code. The name of the file will depend on your platform, but it should be in the same folder as the core.py module. Look for _core..pyd on Windows, and _core..so on the other platforms.

If the file is there then perhaps you are trying to use it on the wrong architecture? If the file is not there then you have a problem with the build and/or installation. Where did you get wxPython and how did you do the install?

···

On Friday, October 5, 2018 at 8:04:14 PM UTC-7, Robert McFadzean wrote:

I just started migrating to python 3.7 and wxpython 4.0.1. I get the error: No module named ‘wx._core’. When I look in the core.py module there is the line: from ._core import *, but I don’t see that module anywhere. Where is the _core module?

Robin

Thank you for your reply and sorry for not giving more information. I am using Ubuntu 18.04.1 LTS on an AMD64 bit machine. I used synaptic to install both Python and wxPython. I program using Ecipse Oxygen.3a release(4.7.3a). I do see the file your refer to: _core.cpython-36m-x86_64-linux-gnu.so, and it is in the same folder with the core.py module: /usr/lib/python3/dist-packages/wx. The program is picking up the core.py, so I don’t understand why it doesn’t pick up the _core too.

···

On Friday, October 5, 2018 at 10:16:39 PM UTC-6, Robin Dunn wrote:

On Friday, October 5, 2018 at 8:04:14 PM UTC-7, Robert McFadzean wrote:

I just started migrating to python 3.7 and wxpython 4.0.1. I get the error: No module named ‘wx._core’. When I look in the core.py module there is the line: from ._core import *, but I don’t see that module anywhere. Where is the _core module?

It’s a binary extension module, not regular Python code. The name of the file will depend on your platform, but it should be in the same folder as the core.py module. Look for _core..pyd on Windows, and _core..so on the other platforms.

If the file is there then perhaps you are trying to use it on the wrong architecture? If the file is not there then you have a problem with the build and/or installation. Where did you get wxPython and how did you do the install?

Robin

are you using python3 for run your script or just python?

···

Saludos / Best regards

Mario Lacunza
Email:: mlacunza@gmail.com
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Skype: mlacunzav

Lima - Peru

Running python3.7

···

Robert McFadzean

6016 50 Ave

Vermilion AB T9X 1X2
780-853-3563

Looks like that build is for Python 3.6, (based on the “36m” in the extension’s filename).

_core.cpython-36m-x86_64-linux-gnu.so

···

On Saturday, October 6, 2018 at 7:10:58 PM UTC-7, Robert McFadzean wrote:

Running python3.7

Robin

Ubuntu 18.04 does not have the python3.7 version wxPython4, and I am not expert enough to get it. I uninstalled python3.7 and will use python3.6 for now. It is working fine. Thank you for taking time to help me.

···

On Monday, October 8, 2018 at 11:24:41 AM UTC-6, Robin Dunn wrote:

On Saturday, October 6, 2018 at 7:10:58 PM UTC-7, Robert McFadzean wrote:

Running python3.7

Looks like that build is for Python 3.6, (based on the “36m” in the extension’s filename).

_core.cpython-36m-x86_64-linux-gnu.so

Robin

Sorry you are wrong, ubuntu 18.04 have Python3.7 in repos…

···

Saludos / Best regards

Mario Lacunza
Email:: mlacunza@gmail.com
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Skype: mlacunzav

Lima - Peru

upss… I press the send button too much faster :smiley:

AND you need to compile wxPython for it, its very simple is you can read the guide.

···

Saludos / Best regards

Mario Lacunza
Email:: mlacunza@gmail.com
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Skype: mlacunzav

Lima - Peru

Saludos / Best regards

Mario Lacunza
Email:: mlacunza@gmail.com
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Skype: mlacunzav

Lima - Peru

The wxPython4 that I see in synaptic is python3-wxgtk4.0 version 4.0.1 which is the 36m version which it says is the latest version. I am content to wait until they update to the 37m version. Thanks anyway.

···

Robert McFadzean

6016 50 Ave

Vermilion AB T9X 1X2
780-853-3563