473,326 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

My Python cannot find wxPython

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
Jul 18 '05 #1
3 2792
Equis Uno wrote:
Does Python have a concept like PATH or CLASSPATH?


Yes, the PYTHONPATH environment variable.

Jul 18 '05 #2
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
Jul 18 '05 #3
Equis Uno wrote:
...

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


Get Boa from cvs on sf.net.
Actual version is 0.2.8

Uwe
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: ulysses | last post by:
hi, I'm working in python 5 months. I think it's very cool language. I do a p2p python program GUI. First I make a software by wxpython. But I find wxpython use many many memory. Second I use...
4
by: Logan | last post by:
Several people asked me for the following HOWTO, so I decided to post it here (though it is still very 'alpha' and might contain many (?) mistakes; didn't test what I wrote, but wrote it - more or...
3
by: Kenneth McDonald | last post by:
If this is not an appropriate newsgroup for this type of posting, please let me know and (if possible) suggest an alternative. I've done a fair bit of research on the net, but information is...
1
by: Robert | last post by:
Hello I have created a tool in Python 2.3 under WinXP Now I extended this tool and now my tool makes Python crash. I see Dr Watson showing a stacktrace. This tool also uses wxPython. Dr...
29
by: Frank Millman | last post by:
Hi all I am writing a multi-user accounting/business system. Data is stored in a database (PostgreSQL on Linux, SQL Server on Windows). I have written a Python program to run on the client,...
2
by: Alain Paschoud | last post by:
Hi all, I made a small dialog in WxPython. I can run the python script with a double-click or through command line, and everything goes fine (dialog appears, which means that wx module has been...
5
by: Laszlo Nagy | last post by:
Hello, I was trying to get answers for these. SPE homepage was down. Then I found it on berlios (http://developer.berlios.de/forum/forum.php?forum_id=12695) but no one answered since 5 days. In...
5
by: Andrew P | last post by:
Hello, I am new (very) to Python and have just down loaded the latest version of Python (2.5) and WXPython (2.8). For some reason I cannot get the WXPython demo to run at all. I run windows...
46
by: Chris Stewart | last post by:
I've always had an interest in Python and would like to dabble in it further. I've worked on a few very small command line programs but nothing of any complexity. I'd like to build a really...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.