import wx fails with file not found error

I’m running to an issue with Python 3 and wx version 4.0.3

File “”, line 1, in File “/usr/local/lib/python3.4/dist-packages/wx/init.py”, line 17, in from wx.core import * File “/usr/local/lib/python3.4/dist-packages/wx/core.py”, line 12, in from ._core import * ImportError: /usr/local/lib/python3.4/dist-packages/wx/_core.cpython-34m.so: cannot open shared object file: No such file or directory

The file is in the directory.

I followed the install direction for raspbian from:

https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi

If that file exists (_core.cpython-34m.so), then this almost always
means you are missing one of the prerequisite packages. Did you
apt-get the whole list in the middle of that page?

···

Aydin wrote:

    I'm running to an issue with Python 3 and wx

version 4.0.3

        File "", line 1, in File

“/usr/local/lib/python3.4/dist-packages/wx/init .py”, line 17, in from wx.core
import * File
“/usr/local/lib/python3.4/dist-packages/wx/core.py”, line
12, in from ._core import * ImportError:
/usr/local/lib/python3.4/dist-packages/wx/_core.cpython-34m.so:
cannot open shared object file: No such file or directory

          The file is

in the directory.

          I followed

the install direction for raspbian from:

-- Tim Roberts, Providenza & Boekelheide, Inc.

https://wiki.wxpython.org/BuildWxPythonOnRaspberryPitimr@probo.com

Hi Tim,

I got the same problem, too after installing wxpython.

My computer system is Window 7.

"import wx

ModuleNotFoundError: No module named ‘wx’"

Do you have any suggestion?

Thank you!

···

On Friday, July 6, 2018 at 3:02:48 PM UTC-7, Tim Roberts wrote:

Aydin wrote:

    I'm running to an issue with Python 3 and wx

version 4.0.3

        File "", line 1, in File

“/usr/local/lib/python3.4/dist-packages/wx/init .py”, line 17, in from wx.core
import * File
“/usr/local/lib/python3.4/ dist-packages/wx/core.py”, line
12, in from .core import * ImportError:
/usr/local/lib/python3.4/dist-packages/wx/
core.cpython-34m.so :
cannot open shared object file: No such file or directory

          The file is

in the directory.

          I followed

the install direction for raspbian from:

https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi

If that file exists (_[core.cpython-34m.so](http://core.cpython-34m.so)    ), then this almost always

means you are missing one of the prerequisite packages. Did you
apt-get the whole list in the middle of that page?

-- Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

How did you do the install? If you have more than one Python or Python virtual environment on your computer, are you sure it was installed into the same Python you are testing with?

···

On Wednesday, March 20, 2019 at 10:43:52 AM UTC-7, Khanh D Dang wrote:

Hi Tim,

I got the same problem, too after installing wxpython.

My computer system is Window 7.

"import wx

ModuleNotFoundError: No module named ‘wx’"

Do you have any suggestion?

Robin

HI, I have been down this path >1x with eventual success. The attached doc shows how. Where I departed from the published script is in bold font. I used the installed Python3.5 and did not create a virtual environment (because I do not yet understand that).
Thedemo is beautiful. Graham.

wxPython Installation.docx (20.9 KB)

···

On Wed, Mar 20, 2019 at 10:43 AM ‘Khanh D Dang’ via wxPython-users wxpython-users@googlegroups.com wrote:

Hi Tim,

I got the same problem, too after installing wxpython.

My computer system is Window 7.

"import wx

ModuleNotFoundError: No module named ‘wx’"

Do you have any suggestion?

Thank you!

On Friday, July 6, 2018 at 3:02:48 PM UTC-7, Tim Roberts wrote:

Aydin wrote:

    I'm running to an issue with Python 3 and wx

version 4.0.3

        File "", line 1, in File

“/usr/local/lib/python3.4/dist-packages/wx/init .py”, line 17, in from wx.core
import * File
“/usr/local/lib/python3.4/dist-packages/wx/core.py”, line
12, in from .core import * ImportError:
/usr/local/lib/python3.4/dist-packages/wx/
core.cpython-34m.so :
cannot open shared object file: No such file or directory

          The file is

in the directory.

          I followed

the install direction for raspbian from:

https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi

If that file exists (_[core.cpython-34m.so](http://core.cpython-34m.so)    ), then this almost always

means you are missing one of the prerequisite packages. Did you
apt-get the whole list in the middle of that page?

-- Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

I got the same problem, too after installing wxpython.

No, it's not the same problem.

My computer system is Window 7.
    "import wx
ModuleNotFoundError: No module named 'wx'"

Do you have any suggestion?

How, EXACTLY, did you install wxPython?

There are many ways to screw this up. If you have both Python 2 and Python 3, perhaps you installed one, but your default command line bring up the other.

···

On Mar 20, 2019, at 10:40 AM, 'Khanh D Dang' via wxPython-users <wxpython-users@googlegroups.com> wrote:

Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Hi Tim,

My computer has only one Python version which is 3.6. And I used the following at command line:

pip install wxpython

Khanh

···

Regards,

Khanh

Can you run the following commands and show the output?

 pip \-V
 pip3 \-V
 python \-V
···

'Khanh D Dang' via wxPython-users wrote:

My computer has only one Python version which is 3.6. And I used the following at command line:

pip install wxpython

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

It showed:

  • site-packages\pip <python 3.7> when typing pip -V

  • site-packages\pip <python 3.7> when typing pip3 -V

  • Python 3.7.0 when typing python -V

···

Regards,

Khanh

No it did not.

If you want to learn start by learning to follow instructions
first, *then* second guess on their meaning.

Karsten

···

On Thu, Mar 21, 2019 at 12:13:38PM -0700, wxp-users wrote:

It showed:
- site-packages\pip <python 3.7> when typing pip -V
- site-packages\pip <python 3.7> when typing pip3 -V
- Python 3.7.0 when typing python -V

--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

Additionally, it may be the libpng12-0 problem, which is reported by _core as missing. I was initially under impression that the _core itself is missing (the error message is somewhat ambiguous). Since this is my third time that I’m hunting for ways to simply install wx, I had my notes ready… and it mostly worked except this. But I had that in my notes too, so went to this place and downloaded exactly what it said and it all works now.