473,324 Members | 2,124 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,324 software developers and data experts.

wxPython libraries never detected

Hi, I recently started coding with Python and I've been trying for the
past hour or so to determine why, every time I "import wx" (or compile
another piece of code that imports wx), Python can never find the
libraries.

I'm running Ubuntu Edgy 6.10, and, as per http://www.wxpython.org/download.php#sources,
updated sources.list with the sources and installed python-wxgtk2.8,
python-wxtools and wx2.8-i18n. I compiled the latest Python (as of
writing), 2.5, from source.

For example, SPE tells me that I "need to install at least wxPython v.
2.5.4.1 to run SPE" and any code that relies on "import wx" reports
"ImportError: No module named wx". However, "whereis wx" on the
command line reports "wx: /usr/lib/wx /usr/local/lib/wx /usr/include/
wx". What could be wrong here? I can't figure out why wx isn't being
detected.

Many thanks.

Feb 10 '07 #1
6 1548
hg
d.******@gmail.com wrote:
Hi, I recently started coding with Python and I've been trying for the
past hour or so to determine why, every time I "import wx" (or compile
another piece of code that imports wx), Python can never find the
libraries.

I'm running Ubuntu Edgy 6.10, and, as per
http://www.wxpython.org/download.php#sources, updated sources.list with
the sources and installed python-wxgtk2.8, python-wxtools and wx2.8-i18n.
I compiled the latest Python (as of writing), 2.5, from source.

For example, SPE tells me that I "need to install at least wxPython v.
2.5.4.1 to run SPE" and any code that relies on "import wx" reports
"ImportError: No module named wx". However, "whereis wx" on the
command line reports "wx: /usr/lib/wx /usr/local/lib/wx /usr/include/
wx". What could be wrong here? I can't figure out why wx isn't being
detected.

Many thanks.
By default, you need to have wx installed in the python site-package path /
under Mandriva, I have wx 2.8 installed
here: /usr/lib/python2.4/site-packages/wx-2.8-gtk2-ansi/
hg

Feb 10 '07 #2
On Feb 10, 1:07 pm, hg <h...@nospam.orgwrote:
By default, you need to have wx installed in the python site-package path /
under Mandriva, I have wx 2.8 installed
here: /usr/lib/python2.4/site-packages/wx-2.8-gtk2-ansi/

hg
Ah, now I see. But I have a new problem:

"ls /usr/lib/python2.4/site-packages | grep wx-2.8" returns "wx-2.8-
gtk2-unicode"

I copied wx-2.8-gtk2-unicode to /usr/lib/python2.5/site-packages/,
which I assume the programs I am attempting to compile and run are
using by default, but they still do not find the libraries. How can I
tell where the programs are searching for the libraries?

Thanks.

Feb 10 '07 #3
hg
d.******@gmail.com wrote:
On Feb 10, 1:07 pm, hg <h...@nospam.orgwrote:
>By default, you need to have wx installed in the python site-package path
/ under Mandriva, I have wx 2.8 installed
here: /usr/lib/python2.4/site-packages/wx-2.8-gtk2-ansi/

hg

Ah, now I see. But I have a new problem:

"ls /usr/lib/python2.4/site-packages | grep wx-2.8" returns "wx-2.8-
gtk2-unicode"

I copied wx-2.8-gtk2-unicode to /usr/lib/python2.5/site-packages/,
which I assume the programs I am attempting to compile and run are
using by default, but they still do not find the libraries. How can I
tell where the programs are searching for the libraries?

Thanks.
If you're going to try the copy technique (never tried it) , you also need
to copy wx.pth and wxversion.py.

hg

Feb 10 '07 #4
hg
hg wrote:
d.******@gmail.com wrote:
>On Feb 10, 1:07 pm, hg <h...@nospam.orgwrote:
>>By default, you need to have wx installed in the python site-package
path / under Mandriva, I have wx 2.8 installed
here: /usr/lib/python2.4/site-packages/wx-2.8-gtk2-ansi/

hg

Ah, now I see. But I have a new problem:

"ls /usr/lib/python2.4/site-packages | grep wx-2.8" returns "wx-2.8-
gtk2-unicode"

I copied wx-2.8-gtk2-unicode to /usr/lib/python2.5/site-packages/,
which I assume the programs I am attempting to compile and run are
using by default, but they still do not find the libraries. How can I
tell where the programs are searching for the libraries?

Thanks.

If you're going to try the copy technique (never tried it) , you also need
to copy wx.pth and wxversion.py.

hg
Oh, and remember that a 2.4.pyc will not run with 2.5 ... so I would also
remove all .pyc that I might have copied.

hg

Feb 10 '07 #5
hg wrote:
hg wrote:
>d.******@gmail.com wrote:
>>On Feb 10, 1:07 pm, hg <h...@nospam.orgwrote:
By default, you need to have wx installed in the python site-package
path / under Mandriva, I have wx 2.8 installed
here: /usr/lib/python2.4/site-packages/wx-2.8-gtk2-ansi/

hg
Ah, now I see. But I have a new problem:

"ls /usr/lib/python2.4/site-packages | grep wx-2.8" returns "wx-2.8-
gtk2-unicode"

I copied wx-2.8-gtk2-unicode to /usr/lib/python2.5/site-packages/,
which I assume the programs I am attempting to compile and run are
using by default, but they still do not find the libraries. How can I
tell where the programs are searching for the libraries?

Thanks.
If you're going to try the copy technique (never tried it) , you also need
to copy wx.pth and wxversion.py.

hg

Oh, and remember that a 2.4.pyc will not run with 2.5 ... so I would also
remove all .pyc that I might have copied.
In fact the interpreter will attempt to regenerate .pyc files if the
current ones are from the wrong version, irrespective of file creation
times.

This is a good reason why you shouldn't share pure Python libraries
between different versions (which I have just realised that a couple of
my projects are still doing, explaining some extended timings I'd been
wondering about - great question!)

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Blog of Note: http://holdenweb.blogspot.com
See you at PyCon? http://us.pycon.org/TX2007

Feb 11 '07 #6
On 10 Feb 2007 07:55:05 -0800, d.******@gmail.com <d.******@gmail.comwrote:
Hi, I recently started coding with Python and I've been trying for the
past hour or so to determine why, every time I "import wx" (or compile
another piece of code that imports wx), Python can never find the
libraries.

I'm running Ubuntu Edgy 6.10, and, as per http://www.wxpython.org/download.php#sources,
updated sources.list with the sources and installed python-wxgtk2.8,
python-wxtools and wx2.8-i18n. I compiled the latest Python (as of
writing), 2.5, from source.

For example, SPE tells me that I "need to install at least wxPython v.
2.5.4.1 to run SPE" and any code that relies on "import wx" reports
"ImportError: No module named wx". However, "whereis wx" on the
command line reports "wx: /usr/lib/wx /usr/local/lib/wx /usr/include/
wx". What could be wrong here? I can't figure out why wx isn't being
detected.

Many thanks.

--
wxPython binaries for 2.4 won't run with 2.5.
Feb 12 '07 #7

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

Similar topics

25
by: James Goldwater | last post by:
I'm starting a new hopfully-commercial project soon, and I face a dilemma about whether Python with wxPython would be appropriate. The project has 3 main areas: a) manipulation of lists and...
15
by: Grant Edwards | last post by:
Can anybody recommend a good book on wxPython? Are there any books on wxPython? I've been trying to learn wxPython and/or wax for a few weeks, and I'm just not getting it. wxWindows seems...
25
by: BJörn Lindqvist | last post by:
See: http://www.wxpython.org/quotes.php. especially: "wxPython is the best and most mature cross-platform GUI toolkit, given a number of constraints. The only reason wxPython isn't the standard...
2
by: Daniel Bickett | last post by:
Hello, I am writing an application using two event-driven libraries: wxPython, and twisted. The first problem I encountered in the program is the confliction between the two all-consuming...
0
by: GuyBrush Treepwood | last post by:
I just compiled and installed wxWidgets and wxPython. When I want to test this libraries, I get: Python 2.4 (#1, Feb 19 2005, 19:24:31) on linux2 Type "help", "copyright", "credits" or...
1
by: timothy.williams | last post by:
I'm trying to install wxPython 2.5.3.1 using Python 2.3.2 on a Fedora 2 machine. I have python in a non-standard place, but I'm using --prefix with the configure script to point to where I have...
1
by: James Stroud | last post by:
Hello All, I will soon have an excuse to install a new operating system on my computer. I would like to know exactly what operating system I should have so that I can get wxPython going....
2
by: Raja | last post by:
Hi, I am trying to develop an application which would mainly do the following 2 things . I would like to know how it can be achieved and also the libraries needed for it . i) active window...
19
by: [david] | last post by:
I'd like to refresh the display before I start the main loop. I have code like this: app = App() app.Show() app.long_slow_init() app.MainLoop()
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...
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: 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....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.