Building wxPython fails on Ubuntu 13.10

I’m building wxPython 3.0.0 on Ubuntu 13.10 using Python 2.7.6 via pyenv. Going through the standard CheckInstall instructions, the only change I made was to specify --pkgversion=3.0.0 instead of --pkgversion=2.9.4 when installing wxWidgets. This generates wxwidgets_3.0.0-1_i386.deb.
When the time comes to build wxPython itself, I run the checkinstall command, and after a long while I get this error:
Selecting previously unselected package wxpython.
(Reading database … 178101 files and directories currently installed.)
Unpacking wxpython (from …/wxpython_3.0.0-1_i386.deb) …
dpkg: error processing /home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb (–install):
trying to overwrite ‘/usr/local/lib/libwx_gtk2u_gl-3.0.so.0.0.0’, which is also in package wxwidgets 3.0.0-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

Errors were encountered while processing:
/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb

I’m not really sure why this error is occurring. Any help would be appreciated. By the way, when I try the installation again, do I have to do the wxPython checkinstall command again, or can I just run sudo dpkg -i wxpython_3.0.0-1_i386.deb? The checkinstall instructions don’t seem to include that command for wxPython 3.0.0, only wxPython 2.9.

Did you check the instructions for wxPython 3?

There is a specific section:

http://wiki.wxpython.org/CheckInstall#wxPython_3.0.0

I could compile and install it without issues on Ubuntu 13.10.

The only incomplete topic is to identify all of the dependencies versions (–requires parameter), you can check the required ones for wxPython 2.8 plus some new libs.

Looking at the error, maybe you installed it twice (or with other method beside checkinstall).

I should try remove all the installed files and packages, and then start over with a clean install.

Let me know if I can be of any further help

Best regards,

···

Mariano Reingart
http://www.sistemasagiles.com.ar

http://reingart.blogspot.com

On Sat, Mar 8, 2014 at 6:29 PM, J. Tyui wastedepository@gmail.com wrote:

I’m building wxPython 3.0.0 on Ubuntu 13.10 using Python 2.7.6 via pyenv. Going through the standard CheckInstall instructions, the only change I made was to specify --pkgversion=3.0.0 instead of --pkgversion=2.9.4 when installing wxWidgets. This generates wxwidgets_3.0.0-1_i386.deb.
When the time comes to build wxPython itself, I run the checkinstall command, and after a long while I get this error:
Selecting previously unselected package wxpython.
(Reading database … 178101 files and directories currently installed.)
Unpacking wxpython (from …/wxpython_3.0.0-1_i386.deb) …
dpkg: error processing /home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb (–install):
trying to overwrite ‘/usr/local/lib/libwx_gtk2u_gl-3.0.so.0.0.0’, which is also in package wxwidgets 3.0.0-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

Errors were encountered while processing:
/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb

I’m not really sure why this error is occurring. Any help would be appreciated. By the way, when I try the installation again, do I have to do the wxPython checkinstall command again, or can I just run sudo dpkg -i wxpython_3.0.0-1_i386.deb? The checkinstall instructions don’t seem to include that command for wxPython 3.0.0, only wxPython 2.9.

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.

Thanks for replying. The instructions seemed to want me to build wxWidgets, then wxPython, but apparently that’s not the case, and that’s why I got the error. Or maybe you are supposed to build wxWidgets first, but only on wxPython 2.9? In any case, I actually started fresh on a copy of the operating system which had never tried to install wxPython before, installed python-wxversion using apt-get, and build wxPython using checkinstall. This seemed to work, but actually importing it failed:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “wx/init.py”, line 45, in
from wx._core import *
File “wx/_core.py”, line 4, in
import core
ImportError: No module named core

There are a number of “wx” folders wxPython seems to have created, and presumably one of them is in my path somewhere and it’s the wrong one. To fix this, I added
/usr/local/lib/python2.7/dist-packages
at the start of my PYTHONPATH. (That directory contains both wx and wx-3.0-gtk2 directories, and wx-3.0-gtk2 has another subdir called wx inside it.)

That fixes that error, but I get this one instead:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/init.py”, line 45, in
from wx._core import *
File “/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py”, line 4, in
import core
ImportError: libwx_gtk2u_adv-3.0.so.0: cannot open shared object file: No such file or directory

This baffles me. The only libwx_gtk2u_adv-3.0.so.0 file I have anywhere is back in the directory I downloaded and extracted from SourceForge when I was building wxPython, in the bld subdir: wxPython-src-3.0.0.0/bld/lib

···

On Sunday, March 9, 2014 9:15:28 PM UTC-4, Mariano Reingart wrote:

Did you check the instructions for wxPython 3?

There is a specific section:

http://wiki.wxpython.org/CheckInstall#wxPython_3.0.0

I could compile and install it without issues on Ubuntu 13.10.

The only incomplete topic is to identify all of the dependencies versions (–requires parameter), you can check the required ones for wxPython 2.8 plus some new libs.

Looking at the error, maybe you installed it twice (or with other method beside checkinstall).

I should try remove all the installed files and packages, and then start over with a clean install.

Let me know if I can be of any further help

Best regards,

Mariano Reingart
http://www.sistemasagiles.com.ar

http://reingart.blogspot.com

On Sat, Mar 8, 2014 at 6:29 PM, J. Tyui wastede...@gmail.com wrote:

I’m building wxPython 3.0.0 on Ubuntu 13.10 using Python 2.7.6 via pyenv. Going through the standard CheckInstall instructions, the only change I made was to specify --pkgversion=3.0.0 instead of --pkgversion=2.9.4 when installing wxWidgets. This generates wxwidgets_3.0.0-1_i386.deb.
When the time comes to build wxPython itself, I run the checkinstall command, and after a long while I get this error:
Selecting previously unselected package wxpython.
(Reading database … 178101 files and directories currently installed.)
Unpacking wxpython (from …/wxpython_3.0.0-1_i386.deb) …
dpkg: error processing /home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb (–install):
trying to overwrite ‘/usr/local/lib/libwx_gtk2u_gl-3.0.so.0.0.0’, which is also in package wxwidgets 3.0.0-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

Errors were encountered while processing:
/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb

I’m not really sure why this error is occurring. Any help would be appreciated. By the way, when I try the installation again, do I have to do the wxPython checkinstall command again, or can I just run sudo dpkg -i wxpython_3.0.0-1_i386.deb? The checkinstall instructions don’t seem to include that command for wxPython 3.0.0, only wxPython 2.9.

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-user...@googlegroups.com.

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

Update: Previously, I had run only the

sudo checkinstall -y --pkgname=wxpython --pkgversion=3.0.0 ... ... ...

command. The wxPython 3.0.0 instructions do not ask me to run

sudo dpkg -i wxpython_3.0.0-1_i386.deb

afterwards, but if I now do that even though I wasn’t asked to, then wxPython actually does install the missing libwx_gtk2u_adv-3.0.so.0 file it complained about in my last post to /usr/local/lib. I can then add this directory to LD_LIBRARY_PATH and that fixes my previous error. But then I get this error!

import wx
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python2.7/dist-packages/wx/init.py”, line 45, in
from wx._core import *
File “/usr/local/lib/python2.7/dist-packages/wx/_core.py”, line 4, in
import core
ImportError: /usr/local/lib/python2.7/dist-packages/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

Yeah, my version of Python didn’t use --enable-unicode=ucs4, that shouldn’t matter since I compiled wxPython by hand – shouldn’t wxPython have used the same (presumably UCS2) as the pyenv-provided version of Python it was built with?

Note that I get this error regardless of whether I’m using the
/usr/local/lib/python2.7/dist-packages/wx
or
/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx
installation, by adding its respective parent dir to PYTHONPATH. I tried them separately. (I don’t know why building wxPython created both directories, and they both existed before running the new dpkg command.)

···

On Monday, March 10, 2014 3:39:45 AM UTC-4, J. Tyui wrote:

Did you check the instructions for wxPython 3?

There is a specific section:

http://wiki.wxpython.org/CheckInstall#wxPython_3.0.0

I could compile and install it without issues on Ubuntu 13.10.

The only incomplete topic is to identify all of the dependencies versions (–requires parameter), you can check the required ones for wxPython 2.8 plus some new libs.

Looking at the error, maybe you installed it twice (or with other method beside checkinstall).

I should try remove all the installed files and packages, and then start over with a clean install.

Let me know if I can be of any further help

Best regards,

Mariano Reingart
http://www.sistemasagiles.com.ar

http://reingart.blogspot.com

On Sat, Mar 8, 2014 at 6:29 PM, J. Tyui wastede...@gmail.com wrote:

I’m building wxPython 3.0.0 on Ubuntu 13.10 using Python 2.7.6 via pyenv. Going through the standard CheckInstall instructions, the only change I made was to specify --pkgversion=3.0.0 instead of --pkgversion=2.9.4 when installing wxWidgets. This generates wxwidgets_3.0.0-1_i386.deb.
When the time comes to build wxPython itself, I run the checkinstall command, and after a long while I get this error:
Selecting previously unselected package wxpython.
(Reading database … 178101 files and directories currently installed.)
Unpacking wxpython (from …/wxpython_3.0.0-1_i386.deb) …
dpkg: error processing /home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb (–install):
trying to overwrite ‘/usr/local/lib/libwx_gtk2u_gl-3.0.so.0.0.0’, which is also in package wxwidgets 3.0.0-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

Errors were encountered while processing:
/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb

I’m not really sure why this error is occurring. Any help would be appreciated. By the way, when I try the installation again, do I have to do the wxPython checkinstall command again, or can I just run sudo dpkg -i wxpython_3.0.0-1_i386.deb? The checkinstall instructions don’t seem to include that command for wxPython 3.0.0, only wxPython 2.9.

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-user...@googlegroups.com.

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

Thanks for replying. The instructions seemed to want me to build wxWidgets, then wxPython, but apparently that’s not the case, and that’s why I got the error. Or maybe you are supposed to build wxWidgets first, but only on wxPython 2.9? In any case, I actually started fresh on a copy of the operating system which had never tried to install wxPython before, installed python-wxversion using apt-get, and build wxPython using checkinstall. This seemed to work, but actually importing it failed:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “wx/init.py”, line 45, in
from wx._core import *
File “wx/_core.py”, line 4, in
import core
ImportError: No module named core

There are a number of “wx” folders wxPython seems to have created, and presumably one of them is in my path somewhere and it’s the wrong one. To fix this, I added
/usr/local/lib/python2.7/dist-packages
at the start of my PYTHONPATH. (That directory contains both wx and wx-3.0-gtk2 directories, and wx-3.0-gtk2 has another subdir called wx inside it.)

That fixes that error, but I get this one instead:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/init.py”, line 45, in
from wx._core import *
File “/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py”, line 4, in
import core
ImportError: libwx_gtk2u_adv-3.0.so.0: cannot open shared object file: No such file or directory

This baffles me. The only libwx_gtk2u_adv-3.0.so.0 file I have anywhere is back in the directory I downloaded and extracted from SourceForge when I was building wxPython, in the bld subdir: wxPython-src-3.0.0.0/bld/lib

On Sunday, March 9, 2014 9:15:28 PM UTC-4, Mariano Reingart wrote:

About the errors, maybe you need to run ldconfig to update the cache:

http://wiki.wxpython.org/CheckInstall#Shared_Libraries_.28ldconfig.29

Note that you don’t need to compile wxWidgets by hand, for wx3 now just run build-wxpython.py

python build-wxpython.py --build_dir=…/bld

And checkinstall should install it per default as using the --install parameter

IFAIR it builds both wxPython and wxWidgets, so that’s why there is only a package now created by checkinstall, and not two as with previous versions.

Once build, you can check it is working changing PYTHONPATH and LD_LIBRARY_PATH

export LD_LIBRARY_PATH=…/bld/lib

export PYTHONPATH=…/wxPython

cd …/wxPython/demo

python demo.py

···

Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com

On Mon, Mar 10, 2014 at 5:12 AM, J. Tyui wastedepository@gmail.com wrote:

Update: Previously, I had run only the

sudo checkinstall -y --pkgname=wxpython --pkgversion=3.0.0 ... ... ...

command. The wxPython 3.0.0 instructions do not ask me to run

sudo dpkg -i wxpython_3.0.0-1_i386.deb

afterwards, but if I now do that even though I wasn’t asked to, then wxPython actually does install the missing libwx_gtk2u_adv-3.0.so.0 file it complained about in my last post to /usr/local/lib. I can then add this directory to LD_LIBRARY_PATH and that fixes my previous error. But then I get this error!

import wx
Traceback (most recent call last):
File “”, line 1, in

File “/usr/local/lib/python2.7/dist-packages/wx/init.py”, line 45, in

from wx._core import *

File “/usr/local/lib/python2.7/dist-packages/wx/_core.py”, line 4, in
import core
ImportError: /usr/local/lib/python2.7/dist-packages/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

Yeah, my version of Python didn’t use --enable-unicode=ucs4, that shouldn’t matter since I compiled wxPython by hand – shouldn’t wxPython have used the same (presumably UCS2) as the pyenv-provided version of Python it was built with?

Note that I get this error regardless of whether I’m using the
/usr/local/lib/python2.7/dist-packages/wx
or
/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx
installation, by adding its respective parent dir to PYTHONPATH. I tried them separately. (I don’t know why building wxPython created both directories, and they both existed before running the new dpkg command.)

On Monday, March 10, 2014 3:39:45 AM UTC-4, J. Tyui wrote:

Thanks for replying. The instructions seemed to want me to build wxWidgets, then wxPython, but apparently that’s not the case, and that’s why I got the error. Or maybe you are supposed to build wxWidgets first, but only on wxPython 2.9? In any case, I actually started fresh on a copy of the operating system which had never tried to install wxPython before, installed python-wxversion using apt-get, and build wxPython using checkinstall. This seemed to work, but actually importing it failed:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “wx/init.py”, line 45, in
from wx._core import *

File “wx/_core.py”, line 4, in
import core
ImportError: No module named core

There are a number of “wx” folders wxPython seems to have created, and presumably one of them is in my path somewhere and it’s the wrong one. To fix this, I added

/usr/local/lib/python2.7/dist-packages
at the start of my PYTHONPATH. (That directory contains both wx and wx-3.0-gtk2 directories, and wx-3.0-gtk2 has another subdir called wx inside it.)

That fixes that error, but I get this one instead:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/init.py”, line 45, in

from wx._core import *

File “/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py”, line 4, in
import core
ImportError: libwx_gtk2u_adv-3.0.so.0: cannot open shared object file: No such file or directory

This baffles me. The only libwx_gtk2u_adv-3.0.so.0 file I have anywhere is back in the directory I downloaded and extracted from SourceForge when I was building wxPython, in the bld subdir: wxPython-src-3.0.0.0/bld/lib

On Sunday, March 9, 2014 9:15:28 PM UTC-4, Mariano Reingart wrote:

Did you check the instructions for wxPython 3?

There is a specific section:

http://wiki.wxpython.org/CheckInstall#wxPython_3.0.0

I could compile and install it without issues on Ubuntu 13.10.

The only incomplete topic is to identify all of the dependencies versions (–requires parameter), you can check the required ones for wxPython 2.8 plus some new libs.

Looking at the error, maybe you installed it twice (or with other method beside checkinstall).

I should try remove all the installed files and packages, and then start over with a clean install.

Let me know if I can be of any further help

Best regards,

Mariano Reingart
http://www.sistemasagiles.com.ar

http://reingart.blogspot.com

On Sat, Mar 8, 2014 at 6:29 PM, J. Tyui wastede...@gmail.com wrote:

I’m building wxPython 3.0.0 on Ubuntu 13.10 using Python 2.7.6 via pyenv. Going through the standard CheckInstall instructions, the only change I made was to specify --pkgversion=3.0.0 instead of --pkgversion=2.9.4 when installing wxWidgets. This generates wxwidgets_3.0.0-1_i386.deb.
When the time comes to build wxPython itself, I run the checkinstall command, and after a long while I get this error:
Selecting previously unselected package wxpython.
(Reading database … 178101 files and directories currently installed.)
Unpacking wxpython (from …/wxpython_3.0.0-1_i386.deb) …
dpkg: error processing /home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb (–install):
trying to overwrite ‘/usr/local/lib/libwx_gtk2u_gl-3.0.so.0.0.0’, which is also in package wxwidgets 3.0.0-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

Errors were encountered while processing:
/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb

I’m not really sure why this error is occurring. Any help would be appreciated. By the way, when I try the installation again, do I have to do the wxPython checkinstall command again, or can I just run sudo dpkg -i wxpython_3.0.0-1_i386.deb? The checkinstall instructions don’t seem to include that command for wxPython 3.0.0, only wxPython 2.9.

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-user...@googlegroups.com.

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

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 undid my previous step (the call to sudo dpkg -i wxpython_3.0.0-1_i386.deb) and redid the single wxPython checkinstall command, followed by sudo ldconfig.
This no longer gives me the .so error, but I once again get the

ImportError: /usr/local/lib/python2.7/dist-packages/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

or

ImportError: /usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

error when I try to import wx in Python.

Going back over your previous email, you seem to want me to set LD_LIBRARY_PATH and PYTHONPATH to specific locations within the extracted tarball from SourceForge, rather than the locations in /usr/local/lib/python2.7 that the wxPython installation created. I tried using your versions of these environment variables, but I get this error when I do so:

Traceback (most recent call last):
File “”, line 1, in
File “/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wx/init.py”, line 45, in
from wx._core import *
File “/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wx/_core.py”, line 4, in
import core
ImportError: No module named core

···

On Monday, March 10, 2014 11:48:38 AM UTC-4, Mariano Reingart wrote:

About the errors, maybe you need to run ldconfig to update the cache:

http://wiki.wxpython.org/CheckInstall#Shared_Libraries_.28ldconfig.29

Note that you don’t need to compile wxWidgets by hand, for wx3 now just run build-wxpython.py

python build-wxpython.py --build_dir=…/bld

And checkinstall should install it per default as using the --install parameter

IFAIR it builds both wxPython and wxWidgets, so that’s why there is only a package now created by checkinstall, and not two as with previous versions.

Once build, you can check it is working changing PYTHONPATH and LD_LIBRARY_PATH

export LD_LIBRARY_PATH=…/bld/lib

export PYTHONPATH=…/wxPython

cd …/wxPython/demo

python demo.py

Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com

On Mon, Mar 10, 2014 at 5:12 AM, J. Tyui wastede...@gmail.com wrote:

Update: Previously, I had run only the

sudo checkinstall -y --pkgname=wxpython --pkgversion=3.0.0 ... ... ...

command. The wxPython 3.0.0 instructions do not ask me to run

sudo dpkg -i wxpython_3.0.0-1_i386.deb

afterwards, but if I now do that even though I wasn’t asked to, then wxPython actually does install the missing libwx_gtk2u_adv-3.0.so.0 file it complained about in my last post to /usr/local/lib. I can then add this directory to LD_LIBRARY_PATH and that fixes my previous error. But then I get this error!

import wx
Traceback (most recent call last):
File “”, line 1, in

On Monday, March 10, 2014 3:39:45 AM UTC-4, J. Tyui wrote:

Did you check the instructions for wxPython 3?

There is a specific section:

http://wiki.wxpython.org/CheckInstall#wxPython_3.0.0

I could compile and install it without issues on Ubuntu 13.10.

The only incomplete topic is to identify all of the dependencies versions (–requires parameter), you can check the required ones for wxPython 2.8 plus some new libs.

Looking at the error, maybe you installed it twice (or with other method beside checkinstall).

I should try remove all the installed files and packages, and then start over with a clean install.

Let me know if I can be of any further help

Best regards,

Mariano Reingart
http://www.sistemasagiles.com.ar

http://reingart.blogspot.com

On Sat, Mar 8, 2014 at 6:29 PM, J. Tyui wastede...@gmail.com wrote:

I’m building wxPython 3.0.0 on Ubuntu 13.10 using Python 2.7.6 via pyenv. Going through the standard CheckInstall instructions, the only change I made was to specify --pkgversion=3.0.0 instead of --pkgversion=2.9.4 when installing wxWidgets. This generates wxwidgets_3.0.0-1_i386.deb.
When the time comes to build wxPython itself, I run the checkinstall command, and after a long while I get this error:
Selecting previously unselected package wxpython.
(Reading database … 178101 files and directories currently installed.)
Unpacking wxpython (from …/wxpython_3.0.0-1_i386.deb) …
dpkg: error processing /home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb (–install):
trying to overwrite ‘/usr/local/lib/libwx_gtk2u_gl-3.0.so.0.0.0’, which is also in package wxwidgets 3.0.0-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

Errors were encountered while processing:
/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb

I’m not really sure why this error is occurring. Any help would be appreciated. By the way, when I try the installation again, do I have to do the wxPython checkinstall command again, or can I just run sudo dpkg -i wxpython_3.0.0-1_i386.deb? The checkinstall instructions don’t seem to include that command for wxPython 3.0.0, only wxPython 2.9.

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-user...@googlegroups.com.

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

Thanks for replying. The instructions seemed to want me to build wxWidgets, then wxPython, but apparently that’s not the case, and that’s why I got the error. Or maybe you are supposed to build wxWidgets first, but only on wxPython 2.9? In any case, I actually started fresh on a copy of the operating system which had never tried to install wxPython before, installed python-wxversion using apt-get, and build wxPython using checkinstall. This seemed to work, but actually importing it failed:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “wx/init.py”, line 45, in
from wx._core import *

File “wx/_core.py”, line 4, in
import core
ImportError: No module named core

There are a number of “wx” folders wxPython seems to have created, and presumably one of them is in my path somewhere and it’s the wrong one. To fix this, I added

/usr/local/lib/python2.7/dist-packages
at the start of my PYTHONPATH. (That directory contains both wx and wx-3.0-gtk2 directories, and wx-3.0-gtk2 has another subdir called wx inside it.)

That fixes that error, but I get this one instead:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/init.py”, line 45, in

from wx._core import *

File “/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py”, line 4, in
import core
ImportError: libwx_gtk2u_adv-3.0.so.0: cannot open shared object file: No such file or directory

This baffles me. The only libwx_gtk2u_adv-3.0.so.0 file I have anywhere is back in the directory I downloaded and extracted from SourceForge when I was building wxPython, in the bld subdir: wxPython-src-3.0.0.0/bld/lib

On Sunday, March 9, 2014 9:15:28 PM UTC-4, Mariano Reingart wrote:

File “/usr/local/lib/python2.7/dist-packages/wx/init.py”, line 45, in

from wx._core import *

File “/usr/local/lib/python2.7/dist-packages/wx/_core.py”, line 4, in
import core
ImportError: /usr/local/lib/python2.7/dist-packages/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

Yeah, my version of Python didn’t use --enable-unicode=ucs4, that shouldn’t matter since I compiled wxPython by hand – shouldn’t wxPython have used the same (presumably UCS2) as the pyenv-provided version of Python it was built with?

Note that I get this error regardless of whether I’m using the
/usr/local/lib/python2.7/dist-packages/wx
or
/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx
installation, by adding its respective parent dir to PYTHONPATH. I tried them separately. (I don’t know why building wxPython created both directories, and they both existed before running the new dpkg command.)

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-user...@googlegroups.com.

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

Here is what I did to install from source

I downloaded the latest source code, which at the time was located at:

http://downloads.sourceforge.net/wxpython/wxPython-src-3.0.0.0.tar.bz2

While I was downloading the source code I installed the dependencies which since I am using 12.04 are:

dpkg-dev

build-essential

swig

python2.7-dev

libwebkitgtk-dev

libjpeg-dev

libtiff-dev

ubuntu-restricted-extras

freeglut3

freeglut3-dev

libgtk2.0-dev

libsdl1.2-dev

libgstreamer-plugins-base0.10-dev

After the source code was finished downloading I navigated to the directory it downloaded to and ran:

tar -xvzf wxPython-src-3.0.0.0.tar.bz2

Then:

cd wxPython-src-3.0.0.0/wxPython && python build-wxpython.py --build_dir=…/bld --install

Grabbed a cup of coffee and a sandwich as my laptop took a bit. I didn’t receive any further errors and I can use wxPython 3.0.0.0 with no issues. I have quite a few -dev packages already installed due to me compiling other programs and modules from source so your mileage may vary.

Machine 1:

Asus X200CA

Intel® ULV Pentium® 2117U Processor

DDR3 1333 MHz SDRAM, OnBoard Memory 2 GB

320GB 5400 RPM HDD

Ubuntu 12.04

Machine 2:

Custom Built

Intel i7 3.2GHz Unlocked

DDR3 2133 MHz SDRAM, 16GB

320GB 10,000 RPM HDD

Ubuntu 13.04

···

On Monday, March 10, 2014 1:39:18 PM UTC-4, J. Tyui wrote:

About the errors, maybe you need to run ldconfig to update the cache:

http://wiki.wxpython.org/CheckInstall#Shared_Libraries_.28ldconfig.29

Note that you don’t need to compile wxWidgets by hand, for wx3 now just run build-wxpython.py

python build-wxpython.py --build_dir=…/bld

And checkinstall should install it per default as using the --install parameter

IFAIR it builds both wxPython and wxWidgets, so that’s why there is only a package now created by checkinstall, and not two as with previous versions.

Once build, you can check it is working changing PYTHONPATH and LD_LIBRARY_PATH

export LD_LIBRARY_PATH=…/bld/lib

export PYTHONPATH=…/wxPython

cd …/wxPython/demo

python demo.py

Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com

On Mon, Mar 10, 2014 at 5:12 AM, J. Tyui wastede...@gmail.com wrote:

Update: Previously, I had run only the

sudo checkinstall -y --pkgname=wxpython --pkgversion=3.0.0 ... ... ...

command. The wxPython 3.0.0 instructions do not ask me to run

sudo dpkg -i wxpython_3.0.0-1_i386.deb

afterwards, but if I now do that even though I wasn’t asked to, then wxPython actually does install the missing libwx_gtk2u_adv-3.0.so.0 file it complained about in my last post to /usr/local/lib. I can then add this directory to LD_LIBRARY_PATH and that fixes my previous error. But then I get this error!

import wx
Traceback (most recent call last):
File “”, line 1, in

On Monday, March 10, 2014 3:39:45 AM UTC-4, J. Tyui wrote:

Did you check the instructions for wxPython 3?

There is a specific section:

http://wiki.wxpython.org/CheckInstall#wxPython_3.0.0

I could compile and install it without issues on Ubuntu 13.10.

The only incomplete topic is to identify all of the dependencies versions (–requires parameter), you can check the required ones for wxPython 2.8 plus some new libs.

Looking at the error, maybe you installed it twice (or with other method beside checkinstall).

I should try remove all the installed files and packages, and then start over with a clean install.

Let me know if I can be of any further help

Best regards,

Mariano Reingart
http://www.sistemasagiles.com.ar

http://reingart.blogspot.com

On Sat, Mar 8, 2014 at 6:29 PM, J. Tyui wastede...@gmail.com wrote:

I’m building wxPython 3.0.0 on Ubuntu 13.10 using Python 2.7.6 via pyenv. Going through the standard CheckInstall instructions, the only change I made was to specify --pkgversion=3.0.0 instead of --pkgversion=2.9.4 when installing wxWidgets. This generates wxwidgets_3.0.0-1_i386.deb.
When the time comes to build wxPython itself, I run the checkinstall command, and after a long while I get this error:
Selecting previously unselected package wxpython.
(Reading database … 178101 files and directories currently installed.)
Unpacking wxpython (from …/wxpython_3.0.0-1_i386.deb) …
dpkg: error processing /home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb (–install):
trying to overwrite ‘/usr/local/lib/libwx_gtk2u_gl-3.0.so.0.0.0’, which is also in package wxwidgets 3.0.0-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

Errors were encountered while processing:
/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb

I’m not really sure why this error is occurring. Any help would be appreciated. By the way, when I try the installation again, do I have to do the wxPython checkinstall command again, or can I just run sudo dpkg -i wxpython_3.0.0-1_i386.deb? The checkinstall instructions don’t seem to include that command for wxPython 3.0.0, only wxPython 2.9.

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-user...@googlegroups.com.

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

Thanks for replying. The instructions seemed to want me to build wxWidgets, then wxPython, but apparently that’s not the case, and that’s why I got the error. Or maybe you are supposed to build wxWidgets first, but only on wxPython 2.9? In any case, I actually started fresh on a copy of the operating system which had never tried to install wxPython before, installed python-wxversion using apt-get, and build wxPython using checkinstall. This seemed to work, but actually importing it failed:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “wx/init.py”, line 45, in
from wx._core import *

File “wx/_core.py”, line 4, in
import core
ImportError: No module named core

There are a number of “wx” folders wxPython seems to have created, and presumably one of them is in my path somewhere and it’s the wrong one. To fix this, I added

/usr/local/lib/python2.7/dist-packages
at the start of my PYTHONPATH. (That directory contains both wx and wx-3.0-gtk2 directories, and wx-3.0-gtk2 has another subdir called wx inside it.)

That fixes that error, but I get this one instead:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/init.py”, line 45, in

from wx._core import *

File “/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py”, line 4, in
import core
ImportError: libwx_gtk2u_adv-3.0.so.0: cannot open shared object file: No such file or directory

This baffles me. The only libwx_gtk2u_adv-3.0.so.0 file I have anywhere is back in the directory I downloaded and extracted from SourceForge when I was building wxPython, in the bld subdir: wxPython-src-3.0.0.0/bld/lib

On Sunday, March 9, 2014 9:15:28 PM UTC-4, Mariano Reingart wrote:

File “/usr/local/lib/python2.7/dist-packages/wx/init.py”, line 45, in

from wx._core import *

File “/usr/local/lib/python2.7/dist-packages/wx/_core.py”, line 4, in
import core
ImportError: /usr/local/lib/python2.7/dist-packages/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

Yeah, my version of Python didn’t use --enable-unicode=ucs4, that shouldn’t matter since I compiled wxPython by hand – shouldn’t wxPython have used the same (presumably UCS2) as the pyenv-provided version of Python it was built with?

Note that I get this error regardless of whether I’m using the
/usr/local/lib/python2.7/dist-packages/wx
or
/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx
installation, by adding its respective parent dir to PYTHONPATH. I tried them separately. (I don’t know why building wxPython created both directories, and they both existed before running the new dpkg command.)

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-user...@googlegroups.com.

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

I undid my previous step (the call to sudo dpkg -i wxpython_3.0.0-1_i386.deb) and redid the single wxPython checkinstall command, followed by sudo ldconfig.
This no longer gives me the .so error, but I once again get the

ImportError: /usr/local/lib/python2.7/dist-packages/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

or

ImportError: /usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

error when I try to import wx in Python.

Going back over your previous email, you seem to want me to set LD_LIBRARY_PATH and PYTHONPATH to specific locations within the extracted tarball from SourceForge, rather than the locations in /usr/local/lib/python2.7 that the wxPython installation created. I tried using your versions of these environment variables, but I get this error when I do so:

Traceback (most recent call last):
File “”, line 1, in
File “/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wx/init.py”, line 45, in
from wx._core import *
File “/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wx/_core.py”, line 4, in
import core
ImportError: No module named core

On Monday, March 10, 2014 11:48:38 AM UTC-4, Mariano Reingart wrote:

Which directories did you add to PYTHONPATH and LD_LIBRARY_PATH? The local ones inside the extracted tarball? Others in /usr/local/lib?

···

On Monday, March 10, 2014 3:25:08 PM UTC-4, Mike Stover wrote:

Here is what I did to install from source

I downloaded the latest source code, which at the time was located at:

http://downloads.sourceforge.net/wxpython/wxPython-src-3.0.0.0.tar.bz2

While I was downloading the source code I installed the dependencies which since I am using 12.04 are:

dpkg-dev

build-essential

swig

python2.7-dev

libwebkitgtk-dev

libjpeg-dev

libtiff-dev

ubuntu-restricted-extras

freeglut3

freeglut3-dev

libgtk2.0-dev

libsdl1.2-dev

libgstreamer-plugins-base0.10-dev

After the source code was finished downloading I navigated to the directory it downloaded to and ran:

tar -xvzf wxPython-src-3.0.0.0.tar.bz2

Then:

cd wxPython-src-3.0.0.0/wxPython && python build-wxpython.py --build_dir=…/bld --install

Grabbed a cup of coffee and a sandwich as my laptop took a bit. I didn’t receive any further errors and I can use wxPython 3.0.0.0 with no issues. I have quite a few -dev packages already installed due to me compiling other programs and modules from source so your mileage may vary.

Machine 1:

Asus X200CA

Intel® ULV Pentium® 2117U Processor

DDR3 1333 MHz SDRAM, OnBoard Memory 2 GB

320GB 5400 RPM HDD

Ubuntu 12.04

Machine 2:

Custom Built

Intel i7 3.2GHz Unlocked

DDR3 2133 MHz SDRAM, 16GB

320GB 10,000 RPM HDD

Ubuntu 13.04

On Monday, March 10, 2014 1:39:18 PM UTC-4, J. Tyui wrote:

About the errors, maybe you need to run ldconfig to update the cache:

http://wiki.wxpython.org/CheckInstall#Shared_Libraries_.28ldconfig.29

Note that you don’t need to compile wxWidgets by hand, for wx3 now just run build-wxpython.py

python build-wxpython.py --build_dir=…/bld

And checkinstall should install it per default as using the --install parameter

IFAIR it builds both wxPython and wxWidgets, so that’s why there is only a package now created by checkinstall, and not two as with previous versions.

Once build, you can check it is working changing PYTHONPATH and LD_LIBRARY_PATH

export LD_LIBRARY_PATH=…/bld/lib

export PYTHONPATH=…/wxPython

cd …/wxPython/demo

python demo.py

Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com

On Mon, Mar 10, 2014 at 5:12 AM, J. Tyui wastede...@gmail.com wrote:

Update: Previously, I had run only the

sudo checkinstall -y --pkgname=wxpython --pkgversion=3.0.0 ... ... ...

command. The wxPython 3.0.0 instructions do not ask me to run

sudo dpkg -i wxpython_3.0.0-1_i386.deb

afterwards, but if I now do that even though I wasn’t asked to, then wxPython actually does install the missing libwx_gtk2u_adv-3.0.so.0 file it complained about in my last post to /usr/local/lib. I can then add this directory to LD_LIBRARY_PATH and that fixes my previous error. But then I get this error!

import wx
Traceback (most recent call last):
File “”, line 1, in

On Monday, March 10, 2014 3:39:45 AM UTC-4, J. Tyui wrote:

Did you check the instructions for wxPython 3?

There is a specific section:

http://wiki.wxpython.org/CheckInstall#wxPython_3.0.0

I could compile and install it without issues on Ubuntu 13.10.

The only incomplete topic is to identify all of the dependencies versions (–requires parameter), you can check the required ones for wxPython 2.8 plus some new libs.

Looking at the error, maybe you installed it twice (or with other method beside checkinstall).

I should try remove all the installed files and packages, and then start over with a clean install.

Let me know if I can be of any further help

Best regards,

Mariano Reingart
http://www.sistemasagiles.com.ar

http://reingart.blogspot.com

On Sat, Mar 8, 2014 at 6:29 PM, J. Tyui wastede...@gmail.com wrote:

I’m building wxPython 3.0.0 on Ubuntu 13.10 using Python 2.7.6 via pyenv. Going through the standard CheckInstall instructions, the only change I made was to specify --pkgversion=3.0.0 instead of --pkgversion=2.9.4 when installing wxWidgets. This generates wxwidgets_3.0.0-1_i386.deb.
When the time comes to build wxPython itself, I run the checkinstall command, and after a long while I get this error:
Selecting previously unselected package wxpython.
(Reading database … 178101 files and directories currently installed.)
Unpacking wxpython (from …/wxpython_3.0.0-1_i386.deb) …
dpkg: error processing /home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb (–install):
trying to overwrite ‘/usr/local/lib/libwx_gtk2u_gl-3.0.so.0.0.0’, which is also in package wxwidgets 3.0.0-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

Errors were encountered while processing:
/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb

I’m not really sure why this error is occurring. Any help would be appreciated. By the way, when I try the installation again, do I have to do the wxPython checkinstall command again, or can I just run sudo dpkg -i wxpython_3.0.0-1_i386.deb? The checkinstall instructions don’t seem to include that command for wxPython 3.0.0, only wxPython 2.9.

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-user...@googlegroups.com.

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

Thanks for replying. The instructions seemed to want me to build wxWidgets, then wxPython, but apparently that’s not the case, and that’s why I got the error. Or maybe you are supposed to build wxWidgets first, but only on wxPython 2.9? In any case, I actually started fresh on a copy of the operating system which had never tried to install wxPython before, installed python-wxversion using apt-get, and build wxPython using checkinstall. This seemed to work, but actually importing it failed:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “wx/init.py”, line 45, in
from wx._core import *

File “wx/_core.py”, line 4, in
import core
ImportError: No module named core

There are a number of “wx” folders wxPython seems to have created, and presumably one of them is in my path somewhere and it’s the wrong one. To fix this, I added

/usr/local/lib/python2.7/dist-packages
at the start of my PYTHONPATH. (That directory contains both wx and wx-3.0-gtk2 directories, and wx-3.0-gtk2 has another subdir called wx inside it.)

That fixes that error, but I get this one instead:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/init.py”, line 45, in

from wx._core import *

File “/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py”, line 4, in
import core
ImportError: libwx_gtk2u_adv-3.0.so.0: cannot open shared object file: No such file or directory

This baffles me. The only libwx_gtk2u_adv-3.0.so.0 file I have anywhere is back in the directory I downloaded and extracted from SourceForge when I was building wxPython, in the bld subdir: wxPython-src-3.0.0.0/bld/lib

On Sunday, March 9, 2014 9:15:28 PM UTC-4, Mariano Reingart wrote:

File “/usr/local/lib/python2.7/dist-packages/wx/init.py”, line 45, in

from wx._core import *

File “/usr/local/lib/python2.7/dist-packages/wx/_core.py”, line 4, in
import core
ImportError: /usr/local/lib/python2.7/dist-packages/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

Yeah, my version of Python didn’t use --enable-unicode=ucs4, that shouldn’t matter since I compiled wxPython by hand – shouldn’t wxPython have used the same (presumably UCS2) as the pyenv-provided version of Python it was built with?

Note that I get this error regardless of whether I’m using the
/usr/local/lib/python2.7/dist-packages/wx
or
/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx
installation, by adding its respective parent dir to PYTHONPATH. I tried them separately. (I don’t know why building wxPython created both directories, and they both existed before running the new dpkg command.)

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-user...@googlegroups.com.

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

I undid my previous step (the call to sudo dpkg -i wxpython_3.0.0-1_i386.deb) and redid the single wxPython checkinstall command, followed by sudo ldconfig.
This no longer gives me the .so error, but I once again get the

ImportError: /usr/local/lib/python2.7/dist-packages/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

or

ImportError: /usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

error when I try to import wx in Python.

Going back over your previous email, you seem to want me to set LD_LIBRARY_PATH and PYTHONPATH to specific locations within the extracted tarball from SourceForge, rather than the locations in /usr/local/lib/python2.7 that the wxPython installation created. I tried using your versions of these environment variables, but I get this error when I do so:

Traceback (most recent call last):
File “”, line 1, in
File “/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wx/init.py”, line 45, in
from wx._core import *
File “/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wx/_core.py”, line 4, in
import core
ImportError: No module named core

On Monday, March 10, 2014 11:48:38 AM UTC-4, Mariano Reingart wrote:

I believe you would want to add the directory where the freshly compiled wxPython is currently located. Someone please correct me if I am incorrect.
For example: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/path/to/compiled/wx

The only reason I say this is that I ran into the error:

libwx_gtk2u_adv-3.x.so.0: cannot open shared object file: No such file or directory

And resolved it by adding:

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib

But again I could be incorrect about this and would appreciate it if someone could let me know if I’m right or wrong.

···

On Wednesday, March 12, 2014 2:44:31 AM UTC-4, J. Tyui wrote:

Which directories did you add to PYTHONPATH and LD_LIBRARY_PATH? The local ones inside the extracted tarball? Others in /usr/local/lib?

On Monday, March 10, 2014 3:25:08 PM UTC-4, Mike Stover wrote:

Here is what I did to install from source

I downloaded the latest source code, which at the time was located at:

http://downloads.sourceforge.net/wxpython/wxPython-src-3.0.0.0.tar.bz2

While I was downloading the source code I installed the dependencies which since I am using 12.04 are:

dpkg-dev

build-essential

swig

python2.7-dev

libwebkitgtk-dev

libjpeg-dev

libtiff-dev

ubuntu-restricted-extras

freeglut3

freeglut3-dev

libgtk2.0-dev

libsdl1.2-dev

libgstreamer-plugins-base0.10-dev

After the source code was finished downloading I navigated to the directory it downloaded to and ran:

tar -xvzf wxPython-src-3.0.0.0.tar.bz2

Then:

cd wxPython-src-3.0.0.0/wxPython && python build-wxpython.py --build_dir=…/bld --install

Grabbed a cup of coffee and a sandwich as my laptop took a bit. I didn’t receive any further errors and I can use wxPython 3.0.0.0 with no issues. I have quite a few -dev packages already installed due to me compiling other programs and modules from source so your mileage may vary.

Machine 1:

Asus X200CA

Intel® ULV Pentium® 2117U Processor

DDR3 1333 MHz SDRAM, OnBoard Memory 2 GB

320GB 5400 RPM HDD

Ubuntu 12.04

Machine 2:

Custom Built

Intel i7 3.2GHz Unlocked

DDR3 2133 MHz SDRAM, 16GB

320GB 10,000 RPM HDD

Ubuntu 13.04

On Monday, March 10, 2014 1:39:18 PM UTC-4, J. Tyui wrote:

About the errors, maybe you need to run ldconfig to update the cache:

http://wiki.wxpython.org/CheckInstall#Shared_Libraries_.28ldconfig.29

Note that you don’t need to compile wxWidgets by hand, for wx3 now just run build-wxpython.py

python build-wxpython.py --build_dir=…/bld

And checkinstall should install it per default as using the --install parameter

IFAIR it builds both wxPython and wxWidgets, so that’s why there is only a package now created by checkinstall, and not two as with previous versions.

Once build, you can check it is working changing PYTHONPATH and LD_LIBRARY_PATH

export LD_LIBRARY_PATH=…/bld/lib

export PYTHONPATH=…/wxPython

cd …/wxPython/demo

python demo.py

Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com

On Mon, Mar 10, 2014 at 5:12 AM, J. Tyui wastede...@gmail.com wrote:

Update: Previously, I had run only the

sudo checkinstall -y --pkgname=wxpython --pkgversion=3.0.0 ... ... ...

command. The wxPython 3.0.0 instructions do not ask me to run

sudo dpkg -i wxpython_3.0.0-1_i386.deb

afterwards, but if I now do that even though I wasn’t asked to, then wxPython actually does install the missing libwx_gtk2u_adv-3.0.so.0 file it complained about in my last post to /usr/local/lib. I can then add this directory to LD_LIBRARY_PATH and that fixes my previous error. But then I get this error!

import wx
Traceback (most recent call last):
File “”, line 1, in

On Monday, March 10, 2014 3:39:45 AM UTC-4, J. Tyui wrote:

Did you check the instructions for wxPython 3?

There is a specific section:

http://wiki.wxpython.org/CheckInstall#wxPython_3.0.0

I could compile and install it without issues on Ubuntu 13.10.

The only incomplete topic is to identify all of the dependencies versions (–requires parameter), you can check the required ones for wxPython 2.8 plus some new libs.

Looking at the error, maybe you installed it twice (or with other method beside checkinstall).

I should try remove all the installed files and packages, and then start over with a clean install.

Let me know if I can be of any further help

Best regards,

Mariano Reingart
http://www.sistemasagiles.com.ar

http://reingart.blogspot.com

On Sat, Mar 8, 2014 at 6:29 PM, J. Tyui wastede...@gmail.com wrote:

I’m building wxPython 3.0.0 on Ubuntu 13.10 using Python 2.7.6 via pyenv. Going through the standard CheckInstall instructions, the only change I made was to specify --pkgversion=3.0.0 instead of --pkgversion=2.9.4 when installing wxWidgets. This generates wxwidgets_3.0.0-1_i386.deb.
When the time comes to build wxPython itself, I run the checkinstall command, and after a long while I get this error:
Selecting previously unselected package wxpython.
(Reading database … 178101 files and directories currently installed.)
Unpacking wxpython (from …/wxpython_3.0.0-1_i386.deb) …
dpkg: error processing /home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb (–install):
trying to overwrite ‘/usr/local/lib/libwx_gtk2u_gl-3.0.so.0.0.0’, which is also in package wxwidgets 3.0.0-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

Errors were encountered while processing:
/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb

I’m not really sure why this error is occurring. Any help would be appreciated. By the way, when I try the installation again, do I have to do the wxPython checkinstall command again, or can I just run sudo dpkg -i wxpython_3.0.0-1_i386.deb? The checkinstall instructions don’t seem to include that command for wxPython 3.0.0, only wxPython 2.9.

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-user...@googlegroups.com.

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

Thanks for replying. The instructions seemed to want me to build wxWidgets, then wxPython, but apparently that’s not the case, and that’s why I got the error. Or maybe you are supposed to build wxWidgets first, but only on wxPython 2.9? In any case, I actually started fresh on a copy of the operating system which had never tried to install wxPython before, installed python-wxversion using apt-get, and build wxPython using checkinstall. This seemed to work, but actually importing it failed:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “wx/init.py”, line 45, in
from wx._core import *

File “wx/_core.py”, line 4, in
import core
ImportError: No module named core

There are a number of “wx” folders wxPython seems to have created, and presumably one of them is in my path somewhere and it’s the wrong one. To fix this, I added

/usr/local/lib/python2.7/dist-packages
at the start of my PYTHONPATH. (That directory contains both wx and wx-3.0-gtk2 directories, and wx-3.0-gtk2 has another subdir called wx inside it.)

That fixes that error, but I get this one instead:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/init.py”, line 45, in

from wx._core import *

File “/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py”, line 4, in
import core
ImportError: libwx_gtk2u_adv-3.0.so.0: cannot open shared object file: No such file or directory

This baffles me. The only libwx_gtk2u_adv-3.0.so.0 file I have anywhere is back in the directory I downloaded and extracted from SourceForge when I was building wxPython, in the bld subdir: wxPython-src-3.0.0.0/bld/lib

On Sunday, March 9, 2014 9:15:28 PM UTC-4, Mariano Reingart wrote:

File “/usr/local/lib/python2.7/dist-packages/wx/init.py”, line 45, in

from wx._core import *

File “/usr/local/lib/python2.7/dist-packages/wx/_core.py”, line 4, in
import core
ImportError: /usr/local/lib/python2.7/dist-packages/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

Yeah, my version of Python didn’t use --enable-unicode=ucs4, that shouldn’t matter since I compiled wxPython by hand – shouldn’t wxPython have used the same (presumably UCS2) as the pyenv-provided version of Python it was built with?

Note that I get this error regardless of whether I’m using the
/usr/local/lib/python2.7/dist-packages/wx
or
/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx
installation, by adding its respective parent dir to PYTHONPATH. I tried them separately. (I don’t know why building wxPython created both directories, and they both existed before running the new dpkg command.)

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-user...@googlegroups.com.

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

I undid my previous step (the call to sudo dpkg -i wxpython_3.0.0-1_i386.deb) and redid the single wxPython checkinstall command, followed by sudo ldconfig.
This no longer gives me the .so error, but I once again get the

ImportError: /usr/local/lib/python2.7/dist-packages/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

or

ImportError: /usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

error when I try to import wx in Python.

Going back over your previous email, you seem to want me to set LD_LIBRARY_PATH and PYTHONPATH to specific locations within the extracted tarball from SourceForge, rather than the locations in /usr/local/lib/python2.7 that the wxPython installation created. I tried using your versions of these environment variables, but I get this error when I do so:

Traceback (most recent call last):
File “”, line 1, in
File “/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wx/init.py”, line 45, in
from wx._core import *
File “/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wx/_core.py”, line 4, in
import core
ImportError: No module named core

On Monday, March 10, 2014 11:48:38 AM UTC-4, Mariano Reingart wrote:

I forgot to mention that I found the fix for my error at: https://sites.google.com/site/opensourceconstriubtions/ettl-martin-1/tutorials/how-to-solve-following-error-when-starting-a-wxwidgets-application-libwx_gtk2u_adv-3-x-so-0-cannot-open-shared-object-file-no-such-file-or-directory

···

On Thursday, March 13, 2014 9:27:52 AM UTC-4, Mike Stover wrote:

I believe you would want to add the directory where the freshly compiled wxPython is currently located. Someone please correct me if I am incorrect.
For example: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/path/to/compiled/wx

The only reason I say this is that I ran into the error:

libwx_gtk2u_adv-3.x.so.0: cannot open shared object file: No such file or directory

And resolved it by adding:

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib

But again I could be incorrect about this and would appreciate it if someone could let me know if I’m right or wrong.

On Wednesday, March 12, 2014 2:44:31 AM UTC-4, J. Tyui wrote:

Which directories did you add to PYTHONPATH and LD_LIBRARY_PATH? The local ones inside the extracted tarball? Others in /usr/local/lib?

On Monday, March 10, 2014 3:25:08 PM UTC-4, Mike Stover wrote:

Here is what I did to install from source

I downloaded the latest source code, which at the time was located at:

http://downloads.sourceforge.net/wxpython/wxPython-src-3.0.0.0.tar.bz2

While I was downloading the source code I installed the dependencies which since I am using 12.04 are:

dpkg-dev

build-essential

swig

python2.7-dev

libwebkitgtk-dev

libjpeg-dev

libtiff-dev

ubuntu-restricted-extras

freeglut3

freeglut3-dev

libgtk2.0-dev

libsdl1.2-dev

libgstreamer-plugins-base0.10-dev

After the source code was finished downloading I navigated to the directory it downloaded to and ran:

tar -xvzf wxPython-src-3.0.0.0.tar.bz2

Then:

cd wxPython-src-3.0.0.0/wxPython && python build-wxpython.py --build_dir=…/bld --install

Grabbed a cup of coffee and a sandwich as my laptop took a bit. I didn’t receive any further errors and I can use wxPython 3.0.0.0 with no issues. I have quite a few -dev packages already installed due to me compiling other programs and modules from source so your mileage may vary.

Machine 1:

Asus X200CA

Intel® ULV Pentium® 2117U Processor

DDR3 1333 MHz SDRAM, OnBoard Memory 2 GB

320GB 5400 RPM HDD

Ubuntu 12.04

Machine 2:

Custom Built

Intel i7 3.2GHz Unlocked

DDR3 2133 MHz SDRAM, 16GB

320GB 10,000 RPM HDD

Ubuntu 13.04

On Monday, March 10, 2014 1:39:18 PM UTC-4, J. Tyui wrote:

About the errors, maybe you need to run ldconfig to update the cache:

http://wiki.wxpython.org/CheckInstall#Shared_Libraries_.28ldconfig.29

Note that you don’t need to compile wxWidgets by hand, for wx3 now just run build-wxpython.py

python build-wxpython.py --build_dir=…/bld

And checkinstall should install it per default as using the --install parameter

IFAIR it builds both wxPython and wxWidgets, so that’s why there is only a package now created by checkinstall, and not two as with previous versions.

Once build, you can check it is working changing PYTHONPATH and LD_LIBRARY_PATH

export LD_LIBRARY_PATH=…/bld/lib

export PYTHONPATH=…/wxPython

cd …/wxPython/demo

python demo.py

Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com

On Mon, Mar 10, 2014 at 5:12 AM, J. Tyui wastede...@gmail.com wrote:

Update: Previously, I had run only the

sudo checkinstall -y --pkgname=wxpython --pkgversion=3.0.0 ... ... ...

command. The wxPython 3.0.0 instructions do not ask me to run

sudo dpkg -i wxpython_3.0.0-1_i386.deb

afterwards, but if I now do that even though I wasn’t asked to, then wxPython actually does install the missing libwx_gtk2u_adv-3.0.so.0 file it complained about in my last post to /usr/local/lib. I can then add this directory to LD_LIBRARY_PATH and that fixes my previous error. But then I get this error!

import wx
Traceback (most recent call last):
File “”, line 1, in

On Monday, March 10, 2014 3:39:45 AM UTC-4, J. Tyui wrote:

Did you check the instructions for wxPython 3?

There is a specific section:

http://wiki.wxpython.org/CheckInstall#wxPython_3.0.0

I could compile and install it without issues on Ubuntu 13.10.

The only incomplete topic is to identify all of the dependencies versions (–requires parameter), you can check the required ones for wxPython 2.8 plus some new libs.

Looking at the error, maybe you installed it twice (or with other method beside checkinstall).

I should try remove all the installed files and packages, and then start over with a clean install.

Let me know if I can be of any further help

Best regards,

Mariano Reingart
http://www.sistemasagiles.com.ar

http://reingart.blogspot.com

On Sat, Mar 8, 2014 at 6:29 PM, J. Tyui wastede...@gmail.com wrote:

I’m building wxPython 3.0.0 on Ubuntu 13.10 using Python 2.7.6 via pyenv. Going through the standard CheckInstall instructions, the only change I made was to specify --pkgversion=3.0.0 instead of --pkgversion=2.9.4 when installing wxWidgets. This generates wxwidgets_3.0.0-1_i386.deb.
When the time comes to build wxPython itself, I run the checkinstall command, and after a long while I get this error:
Selecting previously unselected package wxpython.
(Reading database … 178101 files and directories currently installed.)
Unpacking wxpython (from …/wxpython_3.0.0-1_i386.deb) …
dpkg: error processing /home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb (–install):
trying to overwrite ‘/usr/local/lib/libwx_gtk2u_gl-3.0.so.0.0.0’, which is also in package wxwidgets 3.0.0-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

Errors were encountered while processing:
/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wxpython_3.0.0-1_i386.deb

I’m not really sure why this error is occurring. Any help would be appreciated. By the way, when I try the installation again, do I have to do the wxPython checkinstall command again, or can I just run sudo dpkg -i wxpython_3.0.0-1_i386.deb? The checkinstall instructions don’t seem to include that command for wxPython 3.0.0, only wxPython 2.9.

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-user...@googlegroups.com.

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

Thanks for replying. The instructions seemed to want me to build wxWidgets, then wxPython, but apparently that’s not the case, and that’s why I got the error. Or maybe you are supposed to build wxWidgets first, but only on wxPython 2.9? In any case, I actually started fresh on a copy of the operating system which had never tried to install wxPython before, installed python-wxversion using apt-get, and build wxPython using checkinstall. This seemed to work, but actually importing it failed:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “wx/init.py”, line 45, in
from wx._core import *

File “wx/_core.py”, line 4, in
import core
ImportError: No module named core

There are a number of “wx” folders wxPython seems to have created, and presumably one of them is in my path somewhere and it’s the wrong one. To fix this, I added

/usr/local/lib/python2.7/dist-packages
at the start of my PYTHONPATH. (That directory contains both wx and wx-3.0-gtk2 directories, and wx-3.0-gtk2 has another subdir called wx inside it.)

That fixes that error, but I get this one instead:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/init.py”, line 45, in

from wx._core import *

File “/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py”, line 4, in
import core
ImportError: libwx_gtk2u_adv-3.0.so.0: cannot open shared object file: No such file or directory

This baffles me. The only libwx_gtk2u_adv-3.0.so.0 file I have anywhere is back in the directory I downloaded and extracted from SourceForge when I was building wxPython, in the bld subdir: wxPython-src-3.0.0.0/bld/lib

On Sunday, March 9, 2014 9:15:28 PM UTC-4, Mariano Reingart wrote:

File “/usr/local/lib/python2.7/dist-packages/wx/init.py”, line 45, in

from wx._core import *

File “/usr/local/lib/python2.7/dist-packages/wx/_core.py”, line 4, in
import core
ImportError: /usr/local/lib/python2.7/dist-packages/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

Yeah, my version of Python didn’t use --enable-unicode=ucs4, that shouldn’t matter since I compiled wxPython by hand – shouldn’t wxPython have used the same (presumably UCS2) as the pyenv-provided version of Python it was built with?

Note that I get this error regardless of whether I’m using the
/usr/local/lib/python2.7/dist-packages/wx
or
/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx
installation, by adding its respective parent dir to PYTHONPATH. I tried them separately. (I don’t know why building wxPython created both directories, and they both existed before running the new dpkg command.)

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-user...@googlegroups.com.

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

I undid my previous step (the call to sudo dpkg -i wxpython_3.0.0-1_i386.deb) and redid the single wxPython checkinstall command, followed by sudo ldconfig.
This no longer gives me the .so error, but I once again get the

ImportError: /usr/local/lib/python2.7/dist-packages/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

or

ImportError: /usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

error when I try to import wx in Python.

Going back over your previous email, you seem to want me to set LD_LIBRARY_PATH and PYTHONPATH to specific locations within the extracted tarball from SourceForge, rather than the locations in /usr/local/lib/python2.7 that the wxPython installation created. I tried using your versions of these environment variables, but I get this error when I do so:

Traceback (most recent call last):
File “”, line 1, in
File “/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wx/init.py”, line 45, in
from wx._core import *
File “/home/USERNAME/Downloads/wxPython-src-3.0.0.0/wxPython/wx/_core.py”, line 4, in
import core
ImportError: No module named core

On Monday, March 10, 2014 11:48:38 AM UTC-4, Mariano Reingart wrote:

J. Tyui wrote:

I undid my previous step (the call to sudo dpkg -i
wxpython_3.0.0-1_i386.deb) and redid the single wxPython checkinstall
command, followed by sudo ldconfig.
This no longer gives me the .so error, but I once again get the

ImportError: /usr/local/lib/python2.7/dist-packages/wx/_core_.so:
undefined symbol: PyUnicodeUCS4_FromWideChar

or

ImportError:
/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core_.so:
undefined symbol: PyUnicodeUCS4_FromWideChar

error when I try to import wx in Python.

That can happen if the Python you run with is not the same Python you built with, and they have different unicode build settings.

···

--
Robin Dunn
Software Craftsman

I realized that calling
sudo checkinstall … python build-wxpython.py --build_dir=…/bld --install
was using my system version of python due to the “sudo”, so I made a symlink to my pyenv version called 2.7.6 and used that version instead of just “python” in the above command.

This automatically installs wxPython to the proper pyenv directory and lets me import wx in my pyenv version of Python without modifying PYTHONPATH or LD_LIBRARY_PATH, but I still get Unicode errors:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “/home/USERNAME/.pyenv/versions/2.7.6/lib/python2.7/site-packages/wx-3.0-gtk2/wx/init.py”, line 45, in
from wx._core import *
File “/home/USERNAME/.pyenv/versions/2.7.6/lib/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py”, line 4, in
import core
ImportError: /home/USERNAME/.pyenv/versions/2.7.6/lib/python2.7/site-packages/wx-3.0-gtk2/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

So somehow, even when wxPython is installed normally right into my pyenv dir using my pyenv version of Python, it doesn’t use the proper Unicode settings.

···

On Saturday, March 15, 2014 12:53:54 AM UTC-4, Robin Dunn wrote:

J. Tyui wrote:

I undid my previous step (the call to sudo dpkg -i

wxpython_3.0.0-1_i386.deb) and redid the single wxPython checkinstall

command, followed by sudo ldconfig.

This no longer gives me the .so error, but I once again get the

ImportError: /usr/local/lib/python2.7/dist-packages/wx/core.so:

undefined symbol: PyUnicodeUCS4_FromWideChar

or

ImportError:

/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/core.so:

undefined symbol: PyUnicodeUCS4_FromWideChar

error when I try to import wx in Python.

That can happen if the Python you run with is not the same Python you
built with, and they have different unicode build settings.


Robin Dunn

Software Craftsman

http://wxPython.org

Glad you were able to resolve the issue and get wxPython 3.0 working. I found that some versions / distros of Linux are using both Python 3.x and 2.7.x or at least including both. So I did a quick Google search and found, as well as tested another possible solution. Instead of typing sudo python at the beginning using sudo python2.7 worked for me. I tested this with an Ubuntu 13.10 Virtual Machine which has both Python 3 and 2.7.x installed.

···

On Saturday, March 15, 2014 10:45:02 PM UTC-4, J. Tyui wrote:

J. Tyui wrote:

I undid my previous step (the call to sudo dpkg -i

wxpython_3.0.0-1_i386.deb) and redid the single wxPython checkinstall

command, followed by sudo ldconfig.

This no longer gives me the .so error, but I once again get the

ImportError: /usr/local/lib/python2.7/dist-packages/wx/core.so:

undefined symbol: PyUnicodeUCS4_FromWideChar

or

ImportError:

/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/core.so:

undefined symbol: PyUnicodeUCS4_FromWideChar

error when I try to import wx in Python.

That can happen if the Python you run with is not the same Python you
built with, and they have different unicode build settings.


Robin Dunn

Software Craftsman

http://wxPython.org

I realized that calling
sudo checkinstall … python build-wxpython.py --build_dir=…/bld --install
was using my system version of python due to the “sudo”, so I made a symlink to my pyenv version called 2.7.6 and used that version instead of just “python” in the above command.

This automatically installs wxPython to the proper pyenv directory and lets me import wx in my pyenv version of Python without modifying PYTHONPATH or LD_LIBRARY_PATH, but I still get Unicode errors:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “/home/USERNAME/.pyenv/versions/2.7.6/lib/python2.7/site-packages/wx-3.0-gtk2/wx/init.py”, line 45, in
from wx._core import *
File “/home/USERNAME/.pyenv/versions/2.7.6/lib/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py”, line 4, in
import core
ImportError: /home/USERNAME/.pyenv/versions/2.7.6/lib/python2.7/site-packages/wx-3.0-gtk2/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

So somehow, even when wxPython is installed normally right into my pyenv dir using my pyenv version of Python, it doesn’t use the proper Unicode settings.

On Saturday, March 15, 2014 12:53:54 AM UTC-4, Robin Dunn wrote:

Unfortunately, it still isn’t working; see the Unicode error in my previous email.

···

On Sunday, March 16, 2014 12:13:24 AM UTC-4, Mike Stover wrote:

Glad you were able to resolve the issue and get wxPython 3.0 working. I found that some versions / distros of Linux are using both Python 3.x and 2.7.x or at least including both. So I did a quick Google search and found, as well as tested another possible solution. Instead of typing sudo python at the beginning using sudo python2.7 worked for me. I tested this with an Ubuntu 13.10 Virtual Machine which has both Python 3 and 2.7.x installed.

On Saturday, March 15, 2014 10:45:02 PM UTC-4, J. Tyui wrote:

J. Tyui wrote:

I undid my previous step (the call to sudo dpkg -i

wxpython_3.0.0-1_i386.deb) and redid the single wxPython checkinstall

command, followed by sudo ldconfig.

This no longer gives me the .so error, but I once again get the

ImportError: /usr/local/lib/python2.7/dist-packages/wx/core.so:

undefined symbol: PyUnicodeUCS4_FromWideChar

or

ImportError:

/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/core.so:

undefined symbol: PyUnicodeUCS4_FromWideChar

error when I try to import wx in Python.

That can happen if the Python you run with is not the same Python you
built with, and they have different unicode build settings.


Robin Dunn

Software Craftsman

http://wxPython.org

I realized that calling
sudo checkinstall … python build-wxpython.py --build_dir=…/bld --install
was using my system version of python due to the “sudo”, so I made a symlink to my pyenv version called 2.7.6 and used that version instead of just “python” in the above command.

This automatically installs wxPython to the proper pyenv directory and lets me import wx in my pyenv version of Python without modifying PYTHONPATH or LD_LIBRARY_PATH, but I still get Unicode errors:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “/home/USERNAME/.pyenv/versions/2.7.6/lib/python2.7/site-packages/wx-3.0-gtk2/wx/init.py”, line 45, in
from wx._core import *
File “/home/USERNAME/.pyenv/versions/2.7.6/lib/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py”, line 4, in
import core
ImportError: /home/USERNAME/.pyenv/versions/2.7.6/lib/python2.7/site-packages/wx-3.0-gtk2/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

So somehow, even when wxPython is installed normally right into my pyenv dir using my pyenv version of Python, it doesn’t use the proper Unicode settings.

On Saturday, March 15, 2014 12:53:54 AM UTC-4, Robin Dunn wrote:

Sorry, I missed that. I’ll be honest though, I don’t know what would cause that.

···

On Sunday, March 16, 2014 9:38:36 PM UTC-4, J. Tyui wrote:

Unfortunately, it still isn’t working; see the Unicode error in my previous email.

On Sunday, March 16, 2014 12:13:24 AM UTC-4, Mike Stover wrote:

Glad you were able to resolve the issue and get wxPython 3.0 working. I found that some versions / distros of Linux are using both Python 3.x and 2.7.x or at least including both. So I did a quick Google search and found, as well as tested another possible solution. Instead of typing sudo python at the beginning using sudo python2.7 worked for me. I tested this with an Ubuntu 13.10 Virtual Machine which has both Python 3 and 2.7.x installed.

On Saturday, March 15, 2014 10:45:02 PM UTC-4, J. Tyui wrote:

J. Tyui wrote:

I undid my previous step (the call to sudo dpkg -i

wxpython_3.0.0-1_i386.deb) and redid the single wxPython checkinstall

command, followed by sudo ldconfig.

This no longer gives me the .so error, but I once again get the

ImportError: /usr/local/lib/python2.7/dist-packages/wx/core.so:

undefined symbol: PyUnicodeUCS4_FromWideChar

or

ImportError:

/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/core.so:

undefined symbol: PyUnicodeUCS4_FromWideChar

error when I try to import wx in Python.

That can happen if the Python you run with is not the same Python you
built with, and they have different unicode build settings.


Robin Dunn

Software Craftsman

http://wxPython.org

I realized that calling
sudo checkinstall … python build-wxpython.py --build_dir=…/bld --install
was using my system version of python due to the “sudo”, so I made a symlink to my pyenv version called 2.7.6 and used that version instead of just “python” in the above command.

This automatically installs wxPython to the proper pyenv directory and lets me import wx in my pyenv version of Python without modifying PYTHONPATH or LD_LIBRARY_PATH, but I still get Unicode errors:

import wx
Traceback (most recent call last):
File “”, line 1, in
File “/home/USERNAME/.pyenv/versions/2.7.6/lib/python2.7/site-packages/wx-3.0-gtk2/wx/init.py”, line 45, in
from wx._core import *
File “/home/USERNAME/.pyenv/versions/2.7.6/lib/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py”, line 4, in
import core
ImportError: /home/USERNAME/.pyenv/versions/2.7.6/lib/python2.7/site-packages/wx-3.0-gtk2/wx/core.so: undefined symbol: PyUnicodeUCS4_FromWideChar

So somehow, even when wxPython is installed normally right into my pyenv dir using my pyenv version of Python, it doesn’t use the proper Unicode settings.

On Saturday, March 15, 2014 12:53:54 AM UTC-4, Robin Dunn wrote: