[wxPython-users] import wx error question ?
Christopher Barker
Chris.Barker at noaa.gov
Thu Jul 27 09:45:38 PDT 2006
Roger Mayes wrote:
> Yeah, it must be a path issue. Maybe you installed a newer version of
> python, but your shell environment still has the path to the old python
> installation before the path to the new one.
That's my guess too. In addition to Roger's suggestions, you can look on
your system for multiple Pythons:
$ ls -l /usr/bin/python*
-rwxr-xr-x 2 root root 5568 Jun 13 13:41 /usr/bin/python
lrwxrwxrwx 1 root root 6 Jun 29 19:53 /usr/bin/python2 -> python
-rwxr-xr-x 2 root root 5568 Jun 13 13:41 /usr/bin/python2.4
$ ls -l /usr/local/bin/python*
ls: /usr/local/bin/python*: No such file or directory
So in my case, I have python2.4 installed in /usr/bin, and nothing in
/usr/local. In /usr/bin, python and python2.4 are hard links to the same
file, and /usr/bin/python2 is a soft link to it.
Those three are all there so that you can have multiple versions
installed. "python" is the default version, and you can get the version
you want by typing "python2.4" or "python2.3" on the command line.
I tend to put:
#!/usr/bin/env python2.4
on my #! lines, so that I'll be sure to get the one I want, and as a way
to document which version the code was tested against.
It's possible you have a python somewhere else on your PATH, but those
are the two most likely candidates.
To see what you are running:
$ which python
/usr/bin/python
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the wxpython-users
mailing list