简体   繁体   English

从Mac OSX 10.8中删除预安装的python

[英]Remove preinstalled python from Mac OSX 10.8

I want to move to python 3.0 and therefore remove the default python 2.7 (2.6,2.5...) installation on my mac. 我想转移到python 3.0,因此在我的mac上删除默认的python 2.7(2.6,2.5 ...)安装。 Including all the installed packages, $PATH,... 包括所有已安装的软件包,$ PATH,...

Does the python installer from python.org oder MacPorts installer provide an uninstaller, or is there a way to do this manually? 来自python.org或MacPorts安装程序的python安装程序是否提供了卸载程序,或者有没有办法手动执行此操作?

That's a COMPLETELY TERRIBLE idea, and you should never do that. 这是一个完全可怕的想法,你永远不应该这样做。 You're likely to break dependencies and requirements for various software that expect to find the default Python in the default location. 您可能会破坏希望在默认位置找到默认Python的各种软件的依赖关系和要求。

Install your choice of Python 3 ( MacPorts, Python.org, whatever ). 安装您选择的Python 3(MacPorts,Python.org,等等)。 Update your local $PATH variables to use that Python / PythonPath. 更新本地$ PATH变量以使用该Python / PythonPath。

If you don't trust my opinion, here's what official Python.org docs say: 如果你不相信我的意见,这是官方Python.org文档所说的:

http://docs.python.org/2/using/mac.html http://docs.python.org/2/using/mac.html

The Apple-provided build of Python is installed in /System/Library/Frameworks/Python.framework and /usr/bin/python, respectively. Apple提供的Python版本分别安装在/System/Library/Frameworks/Python.framework和/ usr / bin / python中。 You should never modify or delete these, as they are Apple-controlled and are used by Apple- or third-party software. 您永远不应修改或删除这些内容,因为它们由Apple控制并由Apple或第三方软件使用。 Remember that if you choose to install a newer Python version from python.org, you will have two different but functional Python installations on your computer, so it will be important that your paths and usages are consistent with what you want to do. 请记住,如果您选择从python.org安装较新的Python版本,那么您的计算机上将安装两个不同但功能强大的Python,因此您的路径和用法与您想要执行的操作一致非常重要。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM