wxWidgets / Phoenix

wxPython's Project Phoenix. A new implementation of wxPython, better, stronger, faster than he was before.
http://wxpython.org/
2.33k stars 515 forks source link

wxPython doesn't work #541

Closed adonese closed 7 years ago

adonese commented 7 years ago

Hi, I'm using

Ubuntu 16.04 64bit
wxPython 4.0.0b1
Python 3.5, Anaconda

I've Anaconda's Python 3.5 installed as my default system's python. I've installed wxPython on it via pip (version 4.0.0b1). Whenever I import it as wx, I got this error message.

import wx
ImportError: /home/adonese/anaconda3/lib/python3.5/site-packages/wx/_core.cpython-35m-x86_64-linux-gnu.so: symbol _ZNK8wxWindow7IsShownEv, 
version WXU_3.0 not defined in file libwx_gtk2u_core-3.0.so.0 with link time reference

Using ldd results in

$ ldd wx/_core.cpython-35m-x86_64-linux-gnu.so
/home/adonese/anaconda3/lib/libtiff.so.5: no version information available (required by /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0)
    linux-vdso.so.1 =>  (0x00007fffc1d56000)
    libwx_gtk2u_core-3.0.so.0 => /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0 (0x00007f801e880000)
...

Rest of ldd results on pastebin

RobinD42 commented 7 years ago

There is an effort underway by other users to get wxPython4 builds added to the conda repositories. See #423 for more details and links.

RobinD42 commented 7 years ago

Duplicate, sort of.

adonese commented 7 years ago

The solution suggested here solves the problem! I just had to modify the LD_LIBRARY_PATH.

# In my case I did
$ export LD_LIBRARY_PATH=/home/adonese/anaconda3/lib/python3.5/site-packages/wx:$LD_LIBRARY_PATH

# You might also need to source your bashrc and do ldconfig.
$ source ~/.bashrc
$ sudo ldconfig