Python Path

D

diffuser78

I have two python 2.4s on my Ubuntu Linux box. One is Python 2.4.2 and
other is Python 2.4.3. I use SPE as an IDE for coding. I have written a
small app in wxPython. If I run it from SPE it just works fine, but if
I run it from console it gives me import wx eror.

Following is the log which you might find helpful to answer my post.


1) ***When I just type python on console I get following
user@user:~$ python
ActivePython 2.4.2 Build 10 (ActiveState Corp.) based on
Python 2.4.2 (#1, Jan 17 2006, 15:39:23)
[GCC 2.95.3 20010315 (SuSE)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
2) ***AND SPE is using the following version of Python
Python 2.4.3 (#2, Apr 27 2006, 14:43:58)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2


3) ***When I type sys.path on console I get following['', '/opt/ActivePython-2.4/lib/python24.zip', '/opt/ActivePython-
2.4/lib/python 2.4', '/opt/ActivePython-2.4/lib/python2.4/plat-linux2',
'/opt/ActivePython-2.4/ lib/python2.4/lib-tk',
'/opt/ActivePython-2.4/lib/python2.4/lib-dynload', '/opt/
ActivePython-2.4/lib/python2.4/site-packages']

4) ***When I type sys.path on SPE I get following['/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode',
'/usr/share/spe', '/usr/lib/python24.zip', '/usr/lib/python2.4',
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload',
'/usr/local/lib/python2.4/site-packages',
'/usr/lib/python2.4/site-packages',
'/usr/lib/python2.4/site-packages/HTMLgen',
'/usr/lib/python2.4/site-packages/Numeric',
'/usr/lib/python2.4/site-packages/PIL',
'/usr/lib/python2.4/site-packages/cairo',
'/usr/lib/python2.4/site-packages/gst- 0.10',
'/usr/lib/python2.4/site-packages/gtk-2.0',
'/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode',
'/usr/lib/site-python', '/usr/lib/python2.4/site-packages/_spe',
'/usr/lib/python2.4/site-packages/_spe/plugins',
u'/home/darshan/Desktop/Project']


5) *** on which python I get the following
which python
/opt/ActivePython-2.4/bin/python


I want to get rid of ActivePython which I happend to install because I
was trying to Test the IDE by ActiveState and I think this version of
Python was installed by it.

I am happy using Python 2.4.3 but there is not way I am being able to
use it on console.


Every help is appreciated.

Thanks
 
J

John Salerno

I want to get rid of ActivePython which I happend to install because I
was trying to Test the IDE by ActiveState and I think this version of
Python was installed by it.

I am happy using Python 2.4.3 but there is not way I am being able to
use it on console.

I'm not exactly sure how to change the version you are using (I'm not
yet a Linux user!), but I do know that it is highly recommend that you
leave any pre-existing versions of Python on your system, because your
OS or other apps might rely on it. If you are sure ActivePython
installed it, then it's okay to uninstall. It's probably still safe to
uninstall ActivePython, because it won't remove anything it didn't put
on your system in the first place. Just don't uninstall the other
version of Python by itself, because it might have come with Ubuntu
already and the system might need it.
 
D

diffuser78

In my .basrc file I commented the line of ActivePyton and after reboot
everything is fine now.

I can use Python 2.4.3 even on console and SPE both.

thanks


I have two python 2.4s on my Ubuntu Linux box. One is Python 2.4.2 and
other is Python 2.4.3. I use SPE as an IDE for coding. I have written a
small app in wxPython. If I run it from SPE it just works fine, but if
I run it from console it gives me import wx eror.

Following is the log which you might find helpful to answer my post.


1) ***When I just type python on console I get following
user@user:~$ python
ActivePython 2.4.2 Build 10 (ActiveState Corp.) based on
Python 2.4.2 (#1, Jan 17 2006, 15:39:23)
[GCC 2.95.3 20010315 (SuSE)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
2) ***AND SPE is using the following version of Python
Python 2.4.3 (#2, Apr 27 2006, 14:43:58)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2


3) ***When I type sys.path on console I get following['', '/opt/ActivePython-2.4/lib/python24.zip', '/opt/ActivePython-
2.4/lib/python 2.4', '/opt/ActivePython-2.4/lib/python2.4/plat-linux2',
'/opt/ActivePython-2.4/ lib/python2.4/lib-tk',
'/opt/ActivePython-2.4/lib/python2.4/lib-dynload', '/opt/
ActivePython-2.4/lib/python2.4/site-packages']

4) ***When I type sys.path on SPE I get following['/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode',
'/usr/share/spe', '/usr/lib/python24.zip', '/usr/lib/python2.4',
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload',
'/usr/local/lib/python2.4/site-packages',
'/usr/lib/python2.4/site-packages',
'/usr/lib/python2.4/site-packages/HTMLgen',
'/usr/lib/python2.4/site-packages/Numeric',
'/usr/lib/python2.4/site-packages/PIL',
'/usr/lib/python2.4/site-packages/cairo',
'/usr/lib/python2.4/site-packages/gst- 0.10',
'/usr/lib/python2.4/site-packages/gtk-2.0',
'/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode',
'/usr/lib/site-python', '/usr/lib/python2.4/site-packages/_spe',
'/usr/lib/python2.4/site-packages/_spe/plugins',
u'/home/darshan/Desktop/Project']


5) *** on which python I get the following
which python
/opt/ActivePython-2.4/bin/python


I want to get rid of ActivePython which I happend to install because I
was trying to Test the IDE by ActiveState and I think this version of
Python was installed by it.

I am happy using Python 2.4.3 but there is not way I am being able to
use it on console.


Every help is appreciated.

Thanks
 

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,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top