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

标签 python macos macports

我想迁移到 python 3.0,因此删除了我 mac 上的默认 python 2.7 (2.6,2.5...) 安装。包括所有安装的包,$PATH,...

python.org 或 MacPorts 安装程序中的 python 安装程序是否提供卸载程序,或者是否有手动执行此操作的方法?

最佳答案

这是一个完全糟糕的想法,你永远不应该那样做。您可能会破坏期望在默认位置找到默认 Python 的各种软件的依赖关系和要求。

安装您选择的 Python 3(MacPorts、Python.org 等)。更新您的本地 $PATH 变量以使用该 Python/PythonPath。

如果你不相信我的观点,下面是 Python.org 官方文档所说的:

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. You should never modify or delete these, as they are Apple-controlled and are used by Apple- or third-party software. 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 - 从 Mac OSX 10.8 中删除预装的 python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15456386/

相关文章:

python - Python Web 开发中的装饰器与类

python - Django 从模板输出中删除所有空行

python - Google colab 找不到目录(我的云端硬盘)

python - 在OpenCV VideoCapture或Vidgear中访问/打开嵌入式视频

python - 在 OS X 上将 MacPorts 安装的 Python 包与 Enthought(或其他一些)Python 一起使用?

rvm - 在macports上, 'port select'支持哪些端口?

C++ 基本文件 IO 位置

macos - 当 NSCollectionView 获得或丢失项目时,如何使包含窗口/ View 调整大小?

macos - 以编程方式设置 NSWindow Size 不起作用

apache - 共享 httpd.conf