import question on wx ?

D

diffuser78

I have installed wx and everything looks fine. I have written a small
app that uses wx.

When I run my program from the console like
ubuntu $ python PROGRAM_NAME.py

it gives error
Traceback (most recent call last):
File "Project.py", line 6, in ?
import wx
ImportError: No module named wx


But if I run the program from SPE (Stani's Python Editor) it just runs
fine.


How can I resolve such an issue. Please help. Is my path settting worng
...?

Every help is appreciated.

Thanks
 
J

John Salerno

I have installed wx and everything looks fine. I have written a small
app that uses wx.

When I run my program from the console like
ubuntu $ python PROGRAM_NAME.py

it gives error
Traceback (most recent call last):
File "Project.py", line 6, in ?
import wx
ImportError: No module named wx


But if I run the program from SPE (Stani's Python Editor) it just runs
fine.

It could be that the Python version you are using to launch the app from
the console is the preinstalled version on your system and therefore
wxPython wasn't installed into that version. Do you have multiple
versions of Python installed? Probably SPE is using the other version
which *does* have wxPython in it.
 
D

diffuser78

I think what you say makes perfect sense

I am using 2.4.2 python (I typed pthon -V on console to get)

How can I find what my SPE editor is using ?
 
S

SPE - Stani's Python Editor

John said:
It could be that the Python version you are using to launch the app from
the console is the preinstalled version on your system and therefore
wxPython wasn't installed into that version. Do you have multiple
versions of Python installed? Probably SPE is using the other version
which *does* have wxPython in it.
To see which versions SPE uses, go to Help>About and the versions are
mentioned under "Program info". Compare that to the version which
appears if you just type "python" in the command prompt. I've posted a
"howto" on the ubuntuforums how to install the latest wxpython and SPE
on Ubuntu:
http://www.ubuntuforums.org/showthread.php?t=218001&highlight=wxpython

Stani
 
D

diffuser78

That right..on my console it shows python 2.4.2 and on SPE it shows
2.4.3. The wxPython is working fine in SPE i.e with Python 2.4.3.

How can I make sure that when I type python on console I get the 2.4.3
?

Every help is greatly appreciated.

Thanks
 
R

Rob Williscroft

wrote in in
comp.lang.python:
I think what you say makes perfect sense

I am using 2.4.2 python (I typed pthon -V on console to get)

How can I find what my SPE editor is using ?

Wherever you can run python you can find the version by running
the following bit of python

import sys
print sys.version

For example I currently get:

running: python ...\test-1.py
2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)]

from my homebrew (wxPython) editor.

Rob.
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top