Discussion:
How to clean up conflicting versions of wxpython?
Isaac Ullah
2014-03-19 18:27:35 UTC
Permalink
Dear all,

I've got a Xubuntu 12.04 machine that I use for development work on the
GRASS GIS project, which requires wxpython (version 2.8). I also do some
other python programming, and was recently experimenting with the latest
version of wxpython (3.0), which I compiled and installed from source
following these instruction s(http://www.wxpython.org/BUILD.html). However,
since I've done that, GRASS (and some other programs like OpenStereo) give
the following runtime error:

ERROR: wxGUI requires wxPython. libwx_gtk2u_core-3.0.so.0: cannot open
shared object file: No such file or directory

I tried to manually remove all the installed files, but I'm not sure if I
got them all because I can't find a log that tells me where everything went
when I did the install. I've also tried removing and reinstalling
python-wxgtk2.8 with the package manger, but my system seems still to be
"stuck" thinking that there is the 3.0 version installed (even though I can
confirm that 2.8 installs in the correct place).

So, can anyone here help me to find out why programs are still looking for
the 3.0 version of the libraries? It's a pretty major problem for me,
because I need to use this particular computer for development. Any help
will be greatly appreciated!

Sincerely,

Isaac Ullah

PS. Please let me know if there are any files, output of commands, or
additional information that could aid in debugging this problem, and I will
be happy to provide them
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-03-19 22:35:07 UTC
Permalink
On Wed, 19 Mar 2014 11:27:35 -0700 (PDT) Isaac Ullah wrote:

IU> I've got a Xubuntu 12.04 machine that I use for development work on the
IU> GRASS GIS project, which requires wxpython (version 2.8). I also do some
IU> other python programming, and was recently experimenting with the latest
IU> version of wxpython (3.0), which I compiled and installed from source
IU> following these instruction s(http://www.wxpython.org/BUILD.html). However,
IU> since I've done that, GRASS (and some other programs like OpenStereo) give
IU> the following runtime error:

I suspect you'd find more people knowledgeable about this on wxPython
mailing list.

IU> I've also tried removing and reinstalling python-wxgtk2.8 with the
IU> package manger, but my system seems still to be "stuck" thinking that
IU> there is the 3.0 version installed (even though I can confirm that 2.8
IU> installs in the correct place).

I think you have some left over Python modules that you need to clean
up. Check all the directories of Python sys.path on your system for them.

Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Steve Barnes
2014-03-19 22:40:45 UTC
Permalink
Post by Vadim Zeitlin
IU> I've got a Xubuntu 12.04 machine that I use for development work on the
IU> GRASS GIS project, which requires wxpython (version 2.8). I also do some
IU> other python programming, and was recently experimenting with the latest
IU> version of wxpython (3.0), which I compiled and installed from source
IU> following these instruction s(http://www.wxpython.org/BUILD.html). However,
IU> since I've done that, GRASS (and some other programs like OpenStereo) give
I suspect you'd find more people knowledgeable about this on wxPython
mailing list.
IU> I've also tried removing and reinstalling python-wxgtk2.8 with the
IU> package manger, but my system seems still to be "stuck" thinking that
IU> there is the 3.0 version installed (even though I can confirm that 2.8
IU> installs in the correct place).
I think you have some left over Python modules that you need to clean
up. Check all the directories of Python sys.path on your system for them.
Regards,
VZ
Try something along the lines of the following in your top level file:

import wxversion
wxversion.select('2.4')
import wx

Or additional build options can also be selected, although they will not
be required if they are not installed, like this:

import wxversion
wxversion.select('2.5.3-unicode')
import wx

Or you can require an exact match on the build options like this:

import wxversion
wxversion.select('2.5.3-unicode', optionsRequired=True)
import wx

Finally you can also specify a collection of versions that are allowed
by your application, like this:

import wxversion
wxversion.select(['2.5.4', '2.5.5', '2.6'])
import wx

Gadget/Steve
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Isaac Ullah
2014-03-20 14:36:27 UTC
Permalink
Dear Vadim,

Your advice...
Post by Vadim Zeitlin
I think you have some left over Python modules that you need to clean
up. Check all the directories of Python sys.path on your system for them.
...worked brilliantly! I saw that sys.path[9] was'/usr/local/lib/python2.7/dist-packages/wx-3.0-gtk2'. This allowed me to track down some lingering wx3.0 files in
/usr/local/lib/python2.7/dist-packages/, including a wx.pth file that still
pointed to wx-3.0-gtk2. I deleted the lingering files, and changed the
value in that wx.pth file to wx-2.8-gtk2-unicode, and now everything works
as it did (GRASS and OpenStereo both open correctly)!

Thanks also to Gadget Steve for the extra info!

Cheers,

~Isaac
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Steve Barnes
2014-03-20 06:49:06 UTC
Permalink
Post by Isaac Ullah
Dear all,
I've got a Xubuntu 12.04 machine that I use for development work
on the GRASS GIS project, which requires wxpython (version 2.8). I
also do some other python programming, and was recently experimenting
with the latest version of wxpython (3.0), which I compiled and
installed from source following these instruction
s(http://www.wxpython.org/BUILD.html). However, since I've done that,
GRASS (and some other programs like OpenStereo) give the following
ERROR: wxGUI requires wxPython. libwx_gtk2u_core-3.0.so.0: cannot open
shared object file: No such file or directory
I tried to manually remove all the installed files, but I'm not sure
if I got them all because I can't find a log that tells me where
everything went when I did the install. I've also tried removing and
reinstalling python-wxgtk2.8 with the package manger, but my system
seems still to be "stuck" thinking that there is the 3.0 version
installed (even though I can confirm that 2.8 installs in the correct
place).
So, can anyone here help me to find out why programs are still looking
for the 3.0 version of the libraries? It's a pretty major problem for
me, because I need to use this particular computer for development.
Any help will be greatly appreciated!
Sincerely,
Isaac Ullah
PS. Please let me know if there are any files, output of commands, or
additional information that could aid in debugging this problem, and I
will be happy to provide them
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
or visit http://groups.google.com/group/wx-users
Isaac,

If you find or write a small, simple python script that uses wxPython
and then run it with the -v flag it will tell you exactly what is going
on. e.g.:

$ python -v -c "import wx; print 'Done';"

On my system gives:

# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib/python2.7/site.pyc matches /usr/lib/python2.7/site.py
import site # precompiled from /usr/lib/python2.7/site.pyc
# /usr/lib/python2.7/os.pyc matches /usr/lib/python2.7/os.py
import os # precompiled from /usr/lib/python2.7/os.pyc
import errno # builtin
import posix # builtin
# /usr/lib/python2.7/posixpath.pyc matches /usr/lib/python2.7/posixpath.py
import posixpath # precompiled from /usr/lib/python2.7/posixpath.pyc
# /usr/lib/python2.7/stat.pyc matches /usr/lib/python2.7/stat.py
import stat # precompiled from /usr/lib/python2.7/stat.pyc
# /usr/lib/python2.7/genericpath.pyc matches
/usr/lib/python2.7/genericpath.py
import genericpath # precompiled from /usr/lib/python2.7/genericpath.pyc
# /usr/lib/python2.7/warnings.pyc matches /usr/lib/python2.7/warnings.py
import warnings # precompiled from /usr/lib/python2.7/warnings.pyc
# /usr/lib/python2.7/linecache.pyc matches /usr/lib/python2.7/linecache.py
import linecache # precompiled from /usr/lib/python2.7/linecache.pyc
# /usr/lib/python2.7/types.pyc matches /usr/lib/python2.7/types.py
import types # precompiled from /usr/lib/python2.7/types.pyc
# /usr/lib/python2.7/UserDict.pyc matches /usr/lib/python2.7/UserDict.py
import UserDict # precompiled from /usr/lib/python2.7/UserDict.pyc
:
:


Hope that helps.

Gadget/Steve
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...