473,756 Members | 6,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2821
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 pythonWhichIUse dToUse
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
5021
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 PYQT. But memory use still big. But but but when I minimize the windows to taskbar, a fantasy something happened. memory use very very low when windows minimize.
4
3848
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 less - during my own installation of Python 2.3 on Fedora Core 1 Linux for a friend of mine). Anyway, HTH, L.
3
2279
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 scattered all over the place and I haven't been able to find mailing lists relating specifically to python and UIs. I'd like to start using Python for some GUI programming again. I'd like to use Tk, but it seems to be dying a slow death, so it's...
1
1290
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 Watson says: AppName: python.exe AppVer: 0.0.0.0
29
2782
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, which uses wxPython as a gui, and connects to the database via TCP/IP. The client program contains all the authentication and business logic. It has dawned on me that anyone can bypass this by modifying the program. As it is written in Python, with...
2
1940
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 found). Then, I decided to write a C program (under Windows, with Cygwin) that will read my script (through PyRun_SimpleFile() function) and run it. But the system doesn't find the wx module to import... Traceback (most recent call last):
5
3286
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 fact nobody seems to write in anything to that forum, I presume it is dead. I have no other choice than ask it here. I apologize in advance, they may be silly questions. 1. How can I navigate between opened files? Usually I open 10 or more
5
2422
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 XP and it can't find a program to run the demo. Any advice? (apologies if this has been posted before).
46
2120
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 simple GUI app that will work across Mac, Windows, and Linux. How painful is that going to be? I used to be really familiar with Java Swing a few years ago. I imagine it will be similar. Next, what would you say is the best framework I should...
0
9431
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10014
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9844
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9819
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8688
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5289
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3780
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3326
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2647
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.