[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] No module named wx - another data point
From: |
LRK |
Subject: |
Re: [Discuss-gnuradio] No module named wx - another data point |
Date: |
Fri, 15 Apr 2005 16:39:57 -0500 |
User-agent: |
Mutt/1.4.2.1i |
On Fri, Apr 15, 2005 at 01:44:52PM -0700, Eric Blossom wrote:
> On Fri, Apr 15, 2005 at 02:33:38PM -0500, LRK wrote:
> >
> > Probably a clue here somewhere.
> >
> > 'import wx' fails but 'import wxversion' works
> >
> > Then I can select the version and get a different error:
> >
>
> OK. Does the version of python that the wxPython binary was built
> against match the version of python that you're using? The python API
> changes and extensions built against one version don't necessarily run
> with another version. I'm not sure how to check this. On an RPM
> based system they have different names. E.g.,
>
> wxPython2.5-gtk2-ansi-2.5.5.1-mdk101_py2.3.i586.rpm
>
> vs.
>
> wxPython2.5-gtk2-ansi-2.5.5.1-mdk101_py2.4.i586.rpm
>
> Kind of a gnarly naming convention.
>
> I ran into a similar problem myself in some of my code. My import was
> failing, and no error was indicated. Turned out that a shared library
> required for the import to succeed was bad or missing. Maybe there's
> a way to get python to increase the diagnostics during import. I don't know.
'find' does not locate anything that looks like wxPython2.x or wx-2.x other
than the 2.5 versions.
I am building python from source code on this machine using a standard port
to FreeBSD installed by root.
I am building wxPython as user gr.
The user site-packages directory has these wx* files:
drwxr-xr-x 4 gr gr 512 Apr 11 23:42 wx-2.5.5-gtk2-ansi
-rw-r--r-- 1 gr gr 19 Apr 15 14:06 wx.pth
-rw-r--r-- 1 gr gr 14432 Apr 15 14:05 wxversion.py
-rw-r--r-- 1 gr gr 11978 Apr 15 14:13 wxversion.pyc
And wx.pth contains:
wx-2.5.5-gtk2-ansi
Python seems to ignore the *.pth files in this directory but will read
the ones under /usr/local/lib/python2.4/site-packages, the default
directory. The .pth files there need the full pathname for modules in
the user site-packages directory. That still looks like the best fix for
the moment.
'import wxversion' and select obviously adds the path for wx to the sys.path
file.
Still looking....
--
LRK
address@hidden