Ned Deily <n...@acm.org> added the comment:

As far as I know, there is no documented way to totally install a 
python.org OS X installation and the OS X installer does not provide a 
general way to uninstall a package.  So it would be nice for the Python 
installer to provide some sort of uninstall script.

In the meantime, if you just want to temporarily revert, you can modify 
your .bash_profile or other login shell initialization to fix $PATH to 
not add "/Library/Frameworks/Python.framework/Versions/2.6/bin" to $PATH 
(you'll probably find this was added at the end of .bash_profile by the 
installer or by "Update Shell Profile.command") and/or to not have 
/usr/local/bin appear before /usr/bin on $PATH.

If you want to permanently remove the python.org installed version, 
paste the following lines up to and including the chmod into a posix-
compatible shell:

tmpfile=/tmp/generate_file_list
cat <<"NOEXPAND" > "${tmpfile}"
#!/bin/sh
version="${1:-"2.6"}"
file -h /usr/local/bin/* | grep \
"symbolic link to ../../../Library/Frameworks/Python.framework/"\
"Versions/${version}" | cut -d : -f 1
echo "/Library/Frameworks/Python.framework/Versions/${version}"
echo "/Applications/Python ${version}"
set -- Applications Documentation Framework ProfileChanges \
         SystemFixes UnixTools
for package do
  echo "/Library/Receipts/Python${package}-${version}.pkg"
done
NOEXPAND
chmod  ug+x ${tmpfile}

----

The shell script writes to its standard output a list of files and top-
level directories that should be removed.  You can examine the list by 
just running the script:

  ${tmpfile} 2.6

To actually delete the files:

  ${tmpfile} 2.6 | sed -e "s/^.*$/sudo rm -r \"&\"/g" | sh

You will still have to manually edit your .bash_profile script as above.  
Another minor loose end is that the script does not attempt to modify 
the frameworks "Versions/Current" symlink but I don't know of anything 
that depends on that.

----------
assignee:  -> ronaldoussoren
components: +Macintosh
nosy: +ned.deily, ronaldoussoren
versions: +Python 2.7, Python 3.1, Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7107>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to