473,588 Members | 2,452 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

My Python cannot find wxPython


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

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

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


Jul 18 '05 #1
3 2809
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 test
make install
cd /bin/
mv python pythonWhichIUse dToUse
ln -s /python/bin/python .

Next, I added these tokens to my LD_LIBRARY_PATH

Next, I downloaded wxPythonSrc-

I unpacked and installed it with this script:

#! /bin/bash

set -x

export WXPREF=/python/wxPython

cd /CD/python/wxPythonSrc-

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 \

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

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

Jul 18 '05 #4

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

Similar topics

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.
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.
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...
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:
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...
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):
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
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).
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...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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...
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...
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,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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.