This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients gradha, ned.deily, ronaldoussoren
Date 2009-10-11.23:44:20
SpamBayes Score 5.551115e-17
Marked as misclassified No
Message-id <1255304663.69.0.106252325735.issue7107@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-10-11 23:44:23ned.deilysetrecipients: + ned.deily, ronaldoussoren, gradha
2009-10-11 23:44:23ned.deilysetmessageid: <1255304663.69.0.106252325735.issue7107@psf.upfronthosting.co.za>
2009-10-11 23:44:22ned.deilylinkissue7107 messages
2009-10-11 23:44:20ned.deilycreate