Re: 4.0.0b2 -- undefined symbol: _Py_ZeroStruct
Robin Dunn <[email protected]>
| Newsgroups | gmane.comp.python.wxpython.devel |
|---|---|
| Message-ID | <[email protected]> |
Erik Johnson wrote: > 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 > Did you build that instance of Python yourself? If so, did you configure it with --enable-shared? If so, is that libpython shared library being loaded at runtime when _core is imported? You can check the last item by running: ldd /usr/local/lib/python3.5/dist-packages/wx/_core.cpython-35m-arm-linux-gnueabihf.so If not, then you can probably fix it by setting LD_LIBRARY_PATH or editing /etc/ld.so.conf -- Robin Dunn Software Craftsman http://wxPython.org -- 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.