473,473 Members | 1,923 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Uninstall one of two Python's

Hi,

Is it possible to remove one of two instances of Python installed on
the same machine? I have two Python-2.5.2, one in /usr/local/bin/
python2.5 and the other one in /usr/bin/python2.5. The latter has the
modules I use (kinterbasdb, psycopg, mod_python,...) and the first
don't.

I have Apache with mod_python installed as well. When Apache tries to
run a Python script, I think it's using the "wrong" python, and that's
because the /usr/local/bin path is before the /usr/bin path in the
$PATH variable.

Regards

León

Ubuntu 8.04-1
kernel: 2.26.24-1
Nov 17 '08 #1
2 2600
te**********@gmail.com wrote:
Hi,

Is it possible to remove one of two instances of Python installed on
the same machine? I have two Python-2.5.2, one in /usr/local/bin/
python2.5 and the other one in /usr/bin/python2.5. The latter has the
modules I use (kinterbasdb, psycopg, mod_python,...) and the first
don't.

I have Apache with mod_python installed as well. When Apache tries to
run a Python script, I think it's using the "wrong" python, and that's
because the /usr/local/bin path is before the /usr/bin path in the
$PATH variable.
Unless you compiled the module yourself, I doubt that. Ubuntu won't ship
with a mod_* compiled against /usr/local/python

If the module picks up the wrong python, simply removing that won't work I
fear - library loading problems will occur.

So you need to recompile the module with the desired interpreter (or
re-install from the package management)

Diez
Nov 17 '08 #2
>I have Apache with mod_python installed as well. When Apache tries to
>run a Python script, I think it's using the "wrong" python, and that's
because the /usr/local/bin path is before the /usr/bin path in the
$PATH variable.

Unless you compiled the module yourself, I doubt that. Ubuntu won't ship
with a mod_* compiled against /usr/local/python

If the module picks up the wrong python, simply removing that won't work I
fear - library loading problems will occur.
I disagree. If ldconfig prefers /usr/local/lib over /lib:/usr/lib, and
if mod_python was compiled to link against a shared libpython, and if
both Python installations are compiled with --enable-shared, then it
might well happen that the /usr/local one overrides the one that the
Ubuntu maintainer meant to use. In that case, removing the /usr/local
installation (all of it) would indeed solve the problem; one would
have to run ldconfig after doing so.

OTOH, if mod_python was statically linked against the installation in
/usr/local, then you would be right.

Regards,
Martin
Nov 19 '08 #3

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

Similar topics

3
by: Rick Muller | last post by:
I've been trying to figure out whether there are any plans to add an "uninstall" feature to the Python distutils. Googling has found several people posting the same question, but, to the best of my...
3
by: David Bolen | last post by:
Although it isn't often necessary, I tend to be in the habit of uninstalling Python before updating to new minor releases, or especially during the alpha/beta cycle. I'm in the process of...
5
by: Brad Tilley | last post by:
Python 2.3 placed a registry key under: 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Python2.3' When this key was removed, Python no longer appeared in the Windows...
8
by: Alia Khouri | last post by:
If the cannonical way to install a python app is python setup.py install one would expect the following to uninstall it python setup.py uninstall However, distutils doesn't automatically...
0
by: Christopher J. Bottaro | last post by:
I installed Python-2.3.4 from source... configure && make && make install Now I want to remove it, but make uninstall doesn't work. How do I uninstall it? Thanks.
0
by: R. Bernstein | last post by:
In making a release of the recent changes to pdb.py announce here: http://groups.google.com/group/comp.lang.python/browse_thread/thread/b4cb720ed359a733/fbd9f8fef9693e58#fbd9f8fef9693e58 I tried...
5
by: seberino | last post by:
It appears that apps distributed as Python Eggs are either a single compressed blob in site-packages directory or a directory under site-packages directory. Is this ALWAYS true? So by just...
1
by: Rustom Mody | last post by:
Recently I had trouble with the sqlite package under my debian etch box as follows: I first installed the debian package python-pysqlite1.1 using synaptic. Since this seemed too old for other...
1
by: Milos Prudek | last post by:
I run "make install" of Python 2.4.4 and now I discovered that I do not like the default placement of my install. The Makefile does not support an "uninstall" option. Is there a way to uninstall...
3
by: dimitri pater | last post by:
Hello, both python2.3 and python2.5 are installed on my Debian webserver. For some reason, I would like to uninstall Python2.5 which was installed from source (make install) and keep 2.3. I have...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.