My Python cannot find wxPython

E

Equis Uno

Hi,

I'm trying to run some Python software I downloaded off of sf.net.

It's called Boa.

It uses wxPython.

It appears my install of Python cannot see my install of wxPython.

My question:
How can I tell Python where wxPython lives?

Does Python have a concept like PATH or CLASSPATH?

Some more details about my Python-wxPython problem:

When I run Python on my Linux box I see this:


dhcpclient-220-7:/# python
Python 2.3.3 (#1, Jan 9 2004, 22:14:55)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
So, I'm running Python 2.3.3.

When I look in /usr/local/share I see wxPython:


dhcpclient-220-7:/# du /usr/local/share/wx/2.4
228 /usr/local/share/wx/2.4/afm
420 /usr/local/share/wx/2.4/gs_afm
652 /usr/local/share/wx/2.4
dhcpclient-220-7:/#

When I run this "Boa" software I downloaded, I see this:

dhcpclient-220-7:/pt/TThier/Languages/python/boa-constructor-0.2.3# ./Boa.py
Starting Boa Constructor v0.2.3
importing wxPython
Traceback (most recent call last):
File "./Boa.py", line 179, in ?
from wxPython import wx
ImportError: No module named wxPython
dhcpclient-220-7:/pt/TThier/Languages/python/boa-constructor-0.2.3#



How do I get past this error:
ImportError: No module named wxPython

thanks,

-moi
 
E

Equis Uno

I got Boa Constructor working.

I'm not sure what the problem was so I 'wiped the slate clean'.

I downloaded Python-2.3.3.tgz
I unpacked and installed it with this script:

#! /bin/bash

set -x
export DESTDIR=/python/
/bin/rm -rf /python
mkdir /python
make clean
make distclean
../configure --enable-unicode=ucs4 --prefix /python --exec-prefix /python
make
make test
make install
cd /bin/
mv python pythonWhichIUsedToUse
ln -s /python/bin/python .

Next, I added these tokens to my LD_LIBRARY_PATH
/python/lib/python2.3/lib-dynload



Next, I downloaded wxPythonSrc-2.4.2.4.tar.gz

I unpacked and installed it with this script:

#! /bin/bash

set -x

export WXPREF=/python/wxPython

cd /CD/python/wxPythonSrc-2.4.2.4/

mkdir build
cd build
.../configure --with-gtk \
--prefix=$WXPREF \
--enable-rpath=$WXPREF/lib \
--with-opengl \
--enable-geometry \
--enable-optimise \
--enable-debug_flag \
--with-libjpeg=builtin \
--with-libpng=builtin \
--with-libtiff=builtin \
--with-zlib=builtin

make
make install
cd ../wxPython
/bin/python setup.py WX_CONFIG=/python/wxPython/bin/wx-config build install

cd demo
/bin/python demo.py

Next, I added these tokens to my LD_LIBRARY_PATH /python/wxPython/lib




Next, I downloaded boa-constructor-0.2.3.src.zip

I unzipped it.

I ran this and it worked great:
/bin/python Boa.py

-moi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top