4.0.0b2 -- undefined symbol: _Py_ZeroStruct

Erik Johnson <[email protected]>
Newsgroups gmane.comp.python.wxpython.devel
Message-ID <[email protected]>
I'm trying to update my Python package to (finally) use Python 3+, coming 
from 2.7. I wasn't the one who set up our environment originally, but by 
word of mouth I've heard we used the apt-get approach to install wxPython 
previously.

After not finding wxPython in the apt-get repositories, I figured I'd try 
the (personally, preferable) approach of using pip. I installed the 
prerequisites found HERE 
<https://github.com/wxWidgets/Phoenix/blob/master/README.rst#id8>. I dealt 
with a RAM limitation (on a Raspberry Pi) by adding a swap. And, after a 
few hours or so, the installation finished. I didn't think to turn on 
verbose printing, so I don't have the whole log for it on hand, at least 
that I'm aware of.

The incantation was:

$ sudo pip3 install --upgrade --find-links 
https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 
wxPython

The --find-links came from the main wxPython website HERE 
<https://www.wxpython.org/pages/downloads/>. We're running Ubuntu MATE 
16.04.

Here is info on the installation:

$ pip3 show wxPython
Name: wxPython
Version: 4.0.0b2
Summary: Cross platform GUI toolkit for Python, "Phoenix" version
Home-page: http://wxPython.org/
Author: Robin Dunn
Author-email: [email protected]
License: wxWindows Library License 
(https://opensource.org/licenses/wxwindows.php)
Location: /usr/local/lib/python3.5/dist-packages
Requires: six

As mentioned, the previous wxPython installation was done using apt-get, so 
doing a "pip show" doesn't give anything. However, doing a help(wx) after 
importing tells me the path to it is:

    /usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/__init__.py

However, now when I try to "import wx", I get the following:

Python 3.5.2 (default, Sep 14 2017, 22:51:06)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/wx/__init__.py", line 17, in 
<module>
    from wx.core import *
  File "/usr/local/lib/python3.5/dist-packages/wx/core.py", line 12, in 
<module>
    from ._core import *
ImportError: 
/usr/local/lib/python3.5/dist-packages/wx/_core.cpython-35m-arm-linux-gnueabihf.so: 
undefined symbol: _Py_ZeroStruct

Have I missed a step somewhere? Is it still trying to use something from 
the old installation, which is still around?

-- 
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.