Removing Python 2.4.4 on OSX

R

Robert Hicks

I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.

Robert
 
K

kyosohma

I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.

Robert

Windows allows us to uninstall it. I think the only thing it really
installs is the files, and then it sets the system path, so just
delete the files and change your path. Unfortunately, I do not have a
Mac to test with.

Mike
 
7

7stud

Hi,

Robert said:
I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.

Robert

I don't know if this is pertinent to your situation, but yesterday I
read something that said you need a "framework" install in order to do
GUI programming with wxPython. I believe a framework install is what
originally comes with Macs and it is integrated into the OS. I don't
know if there is a framework install for 2.5.

In addition, the download notes for the stand alone MacPython 2.5
install say that there aren't as many modules for 2.5 as there are for
the 2.4, which is something you may want to consider.
 
D

Diez B. Roggisch

Robert said:
I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.

Don't do it. OSX uses the shipped version for its own purposes, and
you'll break things if you uninstall it.

Diez
 
G

Greg Donald

I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.


You're not required to remove the old version before installing the new version.

Just install the new version somewhere like /usr/local and put
/usr/local/bin ahead of your other paths.
 
R

Robert Hicks

You're not required to remove the old version before installing the new version.

Just install the new version somewhere like /usr/local and put
/usr/local/bin ahead of your other paths.

That is exactly what I did. I don't touch the Apple supplied version.
Now I want to put that latest Python on.

Robert
 
R

Robert Hicks

Don't do it. OSX uses the shipped version for its own purposes, and
you'll break things if you uninstall it.

Diez

No, the OSX version is like 2.3 something. I installed the 2.4.4
version in /usr/local bypassing the Apple stuff.

Robert
 
7

7stud

You're not required to remove the old version before installing the new version.

Just install the new version somewhere like /usr/local and put
/usr/local/bin ahead of your other paths.

Can you explain how that works? If you install python in /usr/local,
doesn't that leave you with something like /usr/local/python? So what
does putting usr/local/bin ahead of your other paths do?
 
G

Greg Donald

Can you explain how that works? If you install python in /usr/local,
doesn't that leave you with something like /usr/local/python? So what
does putting usr/local/bin ahead of your other paths do?

../configure --prefix=/usr/local

Then python would be /usr/local/bin/python.

For bash put this somewhere near the end of your .bashrc or /etc/bashrc:

export PATH="/usr/local/bin:$PATH"

Then when you attempt to run the python binary it will be found in the
place you installed it first, not where the system version was
installed.

http://en.wikipedia.org/wiki/Path_(computing)
 
S

skip

bbxx789> Can you explain how that works? If you install python in
bbxx789> /usr/local, doesn't that leave you with something like
bbxx789> /usr/local/python? So what does putting usr/local/bin ahead of
bbxx789> your other paths do?

When you install with --prefix==/usr/local you will wind up with
/usr/local/bin/python. There will also be a /usr/local/lib/pythonX.Y (with
structure underneath it) containing all the Python and extension modules.

Skip
 
S

Shane Geiger

You don't have to uninstall 2.4.4 to use 2.5. Just change where the
symlink points:

shanegeiger@shane-geigers-computer:~\ 14:45:35$ ls -la /usr/bin/python
lrwxr-xr-x 1 root wheel 24 Mar 1 12:48 /usr/bin/python ->
/usr/local/bin/python2.5
shanegeiger@shane-geigers-computer:~\ 14:45:40$

In general, I am a little wary of uninstalling programs like Python
which are used by many applications. You don't want to find out after
you have uninstalled it that something actually needed it. It is much
safer to keep it around.


Windows allows us to uninstall it. I think the only thing it really
installs is the files, and then it sets the system path, so just
delete the files and change your path. Unfortunately, I do not have a
Mac to test with.

Mike

--
Shane Geiger
IT Director
National Council on Economic Education
(e-mail address removed) | 402-438-8958 | http://www.ncee.net

Leading the Campaign for Economic and Financial Literacy
 
J

James Stroud

Shane said:
You don't have to uninstall 2.4.4 to use 2.5. Just change where the
symlink points:

shanegeiger@shane-geigers-computer:~\ 14:45:35$ ls -la /usr/bin/python
lrwxr-xr-x 1 root wheel 24 Mar 1 12:48 /usr/bin/python ->
/usr/local/bin/python2.5
shanegeiger@shane-geigers-computer:~\ 14:45:40$

I have been chastised on this list for a similar suggestion (notably
re-linking /usr/bin/python) as it may break the system because the
particular version installed may be required for some scripts in the system.

Probably better is to create a link in ~/bin and make sure ~/bin is
first in the path. Bash experts--please say how to do this because bash
is default for OSX and is undoubtedly what the OP is using. I use csh.

Better, even than this is to install ipython under 2.5 and put the
following script in your ~/bin (name it python):

#! /bin/csh -f
#second line of script (include above)

if ($#argv == 0) then
/usr/local/bin/ipython # <==or wherever ipython is
else
/usr/local/bin/python2.5 $argv
endif

#end of script

It doesn't matter if you use bash, the above script, though csh, will
run fine.

Now type this in a terminal: "chmod a+x ~/bin/python".

Now you can use ipython or python depending on whether you supply
arguments. ipython will launch if you supply none (which means you want
an interactive interpreter) and "regular" python2.5 will launch if you
give it a script name--avoiding jumping into the ipython interpreter
after the script finishes.

If you don't know what ipython is, you are missing out.

James
 
J

James Stroud

7stud said:
Can you explain how that works? If you install python in /usr/local,
doesn't that leave you with something like /usr/local/python? So what
does putting usr/local/bin ahead of your other paths do?

Don't build python for OS X unless you know you need to or want a
learning experience. Rolling your own python is somewhat a can of worms
for the uninitiated and it will be pretty tough beyond that to make it
run as cleanly as the stock builds. (E.g. you will be asking about why
readline doesn't work, etc.) This stuff is especially the case for OS X,
which does things a little differently than linux.

Just download the 2.5 installer from python.org. Double click it and be
done. A link to the new python will be created for you in
/usr/local/bin. If you already had an earlier installed and the link
didn't get updated, just replace the old one substituting 2.4 (or 2.3)
with 2.5.

Then make sure /usr/local/bin comes before /usr/bin in your path and you
will be set. See also my previous post about integrating ipython.

James
 
M

Michael Bentley

I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.

Don't uninstall it.

That's why Apple put python under /Library/Frameworks/
Python.framework/Versions. So you can have multiple versions installed.

Hopefully you left Apple's default install of 2.3.5 unmolested as
well. My best advise is to download the binaries from python.org and
install. This gives you a nice universal framework build, compete
with readline support.

If you do elect to build it yourself, just make sure to read the Mac
specific documentation (which tells how to generate a framework
build). Whichever route you take, /usr/local/bin/python and /Library/
Frameworks/Python.framework/Versions/Current/bin/python will point to
pyhon2.5. Since you already have 2.4x I assume your path already
contains /usr/local/bin -- otherwise, you'll probably keep picking up
the default 2.3.5 in /usr/bin.

It looks like Stackless has a Mac binary install as well. Does
anybody here know if I can install that on top of a stock 2.5 without
breaking things?

regards,
Michael
 
M

Michael Bentley

In addition, the download notes for the stand alone MacPython 2.5
install say that there aren't as many modules for 2.5 as there are for
the 2.4, which is something you may want to consider.

There aren't as many pre-built modules for 2.5 at the MacPython
site. That's not to say you can't easily build your own, mind you --
assuming you've got developer tools installed.

regards,
Michael
 
M

Michael Bentley

No, the OSX version is like 2.3 something. I installed the 2.4.4
version in /usr/local bypassing the Apple stuff.

Oh! Well then:

---[cut here]---
# danger will robinson -- use at your own risk ;-)
rm /usr/local/bin/python*
rm -rf /usr/local/lib/python
---[snip]---

Is the uninstall program :)
 
7

7stud

Don't uninstall it.

That's why Apple put python under /Library/Frameworks/
Python.framework/Versions. So you can have multiple versions installed.

/Libary/Frameworks/ is an empty directory(except for . and ..) on my
Mac, and I have 2.3.5 installed somewhere.
 
7

7stud

/Libary/Frameworks/ is an empty directory(except for . and ..) on my
Mac, and I have 2.3.5 installed somewhere.

I mean /Library/Frameworks

Misspelled it in the post, but not when I searched it. I did an ls -
al on it and got this:

$ ls -al /Library/Frameworks
total 0
drwxrwxr-x 2 root admin 68 Jul 1 2006 .
drwxrwxr-t 43 root admin 1462 Feb 20 14:31 ..
 
J

js

The only way you can do is rermove python2.4.4's files manually.

I suggest you to use MacPorts or Fink.

With MacPort, you can uninstall python2.4 by doing
$ port uninstall python24

And Installation is
$ port install python25
 

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
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top