How to uninstall Python 2.7 on a Mac OS X 10.6.4?
How to uninstall Python 2.7 on a Mac OS X 10.6.4?
I want to completely remove Python 2.7 from my Mac OS X 10.6.4. I managed to remove the entry from the PATH variable by reverting my .bash_profile. But I also want to remove all directories, files, symlinks, and entries that got installed by the Python 2.7 install package. I've got the install package from http://www.python.org/. What directories/files/configuration file entries do I need to remove? Is there a list somewhere?
Answer by Ned Deily for How to uninstall Python 2.7 on a Mac OS X 10.6.4?
The complete list is documented here. But, basically, all you need to do is to:
remove the Python 2.7 framework
sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7
remove the Python 2.7 applications directory
sudo rm -rf "/Applications/Python 2.7"
remove the symbolic links in
/usr/local/bin
that point to this python version seels -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7'
and then run the following command to remove all the links:cd /usr/local/bin/ ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7' | awk '{print $9}' | tr -d @ | xargs rm
if necessary, edit your shell profile file(s) to remove adding
/Library/Frameworks/Python.framework/Versions/2.7
to yourPATH
environment file. Depending on which shell you use, any of the following files may have been modified:~/.bash_login
,~/.bash_profile
,~/.cshrc
,~/.profile
,~/.tcshrc
, and/or~/.zprofile
.
Answer by conehead for How to uninstall Python 2.7 on a Mac OS X 10.6.4?
This one works:
cd /usr/local/bin/ ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7' | awk '{print $9}' | tr -d @ | xargs rm
Description: It list all the links, removes @
character and then removes them.
Answer by Gabriel Mazetto for How to uninstall Python 2.7 on a Mac OS X 10.6.4?
If you installed it using the PKG installer, you can do:
pkgutil --pkgs
or better:
pkgutil --pkgs | grep org.python.Python
which will output something like:
org.python.Python.PythonApplications-2.7 org.python.Python.PythonDocumentation-2.7 org.python.Python.PythonFramework-2.7 org.python.Python.PythonProfileChanges-2.7 org.python.Python.PythonUnixTools-2.7
you can now select which packages you will unlink (remove).
This is the unlink documentation:
--unlink package-id Unlinks (removes) each file referenced by package-id. WARNING: This command makes no attempt to perform reference counting or dependency analy- sis. It can easily remove files required by your system. It may include unexpected files due to package tainting. Use the --files command first to double check.
In my example you will type
pkgutil --unlink org.python.Python.PythonApplications-2.7 pkgutil --unlink org.python.Python.PythonDocumentation-2.7 pkgutil --unlink org.python.Python.PythonFramework-2.7 pkgutil --unlink org.python.Python.PythonProfileChanges-2.7 pkgutil --unlink org.python.Python.PythonUnixTools-2.7
or in one single line:
pkgutil --pkgs | grep org.python.Python | xargs -L1 pkgutil -f --unlink
Important: --unlink is not available anymore starting with Lion (as of Q1`2014 that would include Lion, Mountain Lion, and Mavericks). If anyone that comes to this instructions try to use it with lion, should try instead to adapt it with what this post is saying: https://wincent.com/wiki/Uninstalling_packages_(.pkg_files)_on_Mac_OS_X
Answer by minhas23 for How to uninstall Python 2.7 on a Mac OS X 10.6.4?
No need to uninstall old python versions.
Just install new version say python-3.3.2-macosx10.6.dmg and change the soft link of python to newly installed python3.3
Check the path of default python and python3.3 with following commands
"which python" and "which python3.3"
then delete existing soft link of python and point it to python3.3
Answer by user86559 for How to uninstall Python 2.7 on a Mac OS X 10.6.4?
In regards to deleting the symbolic links, I found this to be useful.
$ find /usr/local/bin -lname '../../../Library/Frameworks/Python.framework/Versions/2.7/*' -delete
Answer by John Mulhall for How to uninstall Python 2.7 on a Mac OS X 10.6.4?
I uninstalled Python 2.7.10 on Mac OSX Yosemite by doing the following "brew uninstall python". It successfully completed as follows:
John-Mulhall-MacBook-Pro:~ js$ brew uninstall python Uninstalling /usr/local/Cellar/python/2.7.10... (4777 files, 78M) John-Mulhall-MacBook-Pro:~ js$
Obviously you have to have brew installed first for this to work...
https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Installation.md#installation
Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 71
0 comments:
Post a Comment