python, wxpython and Mac OS X

7

7stud

Hi,

I'm using an intel imac which came with python 2.3.5 pre-intstalled on
OS 10.4.7. I was able run a hello world wxPython script in Terminal
by typing:

$pythonw wxPythonTest.py

Yesterday, I installed python 2.4.4 which I downloaded from the
MacPython website, and it seems to have installed correctly:

$python
Python 2.4.4 (#1, Oct 18 2006, 10:34:39)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

However, now when I try to run my hello world wxPython script in
Terminal, I get the error message:

Traceback (most recent call last):
File "wxPythonTest.py", line 1, in ?
import wx
ImportError: No module named wx

Does that mean I need to install a newer version of wxPython? If so,
I'm not sure how to proceed. The wxPython download page says:
-----
The Max OSX version of wxPython is distributed as a set of mountable
disk images. The runtime verisons contain Installer packages, as well
as a script that can perform an uninstall of previous installs of
wxPython. (NOTE: If you have versions prior to 2.5.3.1 installed
please do run the uninstaller to remove the older version.)
------
I looked around in Finder, but I can't tell what version of wxPython
that came pre-installed on my imac, so I am not sure whether I need to
uninstall it.

Also, what wxPython download should I install?
 
R

Robert Kern

7stud said:
Hi,

I'm using an intel imac which came with python 2.3.5 pre-intstalled on
OS 10.4.7. I was able run a hello world wxPython script in Terminal
by typing:

$pythonw wxPythonTest.py

Yesterday, I installed python 2.4.4 which I downloaded from the
MacPython website, and it seems to have installed correctly:

Why 2.4.4 instead of the official 2.5 binary from www.python.org?

http://www.python.org/download/
$python
Python 2.4.4 (#1, Oct 18 2006, 10:34:39)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

However, now when I try to run my hello world wxPython script in
Terminal, I get the error message:

Traceback (most recent call last):
File "wxPythonTest.py", line 1, in ?
import wx
ImportError: No module named wx

Does that mean I need to install a newer version of wxPython?

The packages that are installed (or you might install) for Python 2.3 are
entirely separate from those that you would install for Python 2.4. It's not
that you need a newer version of wxPython; it's that you need to install one for
Python 2.4 period.
Also, what wxPython download should I install?

For 2.4:
http://prdownloads.sourceforge.net/wxpython/wxPython2.8-osx-unicode-2.8.3.0-universal10.4-py2.4.dmg

For 2.5:
http://prdownloads.sourceforge.net/wxpython/wxPython2.8-osx-unicode-2.8.3.0-universal10.4-py2.5.dmg

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
 
7

7stud

7stud wrote:

Why 2.4.4 instead of the official 2.5 binary fromwww.python.org?

http://www.python.org/download/

1) On some download page that listed both python 2.5 and 2.4, it said
that python 2.4 had more packages/modules available for Macs than 2.5.

2) The wxPython website says that to use wxPython on a Mac, you need a
special "framework" build of python--like the one that comes
preinstalled. It says framework builds are available for python 2.4.

Should I remove 2.4.4 and install 2.5 instead?

Thanks.
 
R

Robert Kern

7stud said:
1) On some download page that listed both python 2.5 and 2.4, it said
that python 2.4 had more packages/modules available for Macs than 2.5.

That's probably still a fair statement.
2) The wxPython website says that to use wxPython on a Mac, you need a
special "framework" build of python--like the one that comes
preinstalled. It says framework builds are available for python 2.4.

The 2.5 binary on www.python.org is also a framework build.
Should I remove 2.4.4 and install 2.5 instead?

No, it's okay.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top