简体   繁体   English

如何在 Mac 上卸载 pyenv(由自制软件安装)

[英]how to uninstall pyenv(installed by homebrew) on Mac

以前用homebrew安装pyenv来管理python的版本,现在想用anaconda,但是不知道怎么卸载pyenv,请告诉我。

From the docs:从文档:

Uninstalling pyenv卸载 pyenv

The simplicity of pyenv makes it easy to temporarily disable it, or uninstall from the system. pyenv 的简单性使得暂时禁用它或从系统中卸载变得容易。

  1. To disable Pyenv managing your Python versions, simply remove the pyenv init line from your shell startup configuration.禁用Pyenv 管理您的 Python 版本,只需从 shell 启动配置中删除pyenv init行。 This will remove Pyenv shims directory from PATH, and future invocations like python will execute the system Python version, as before Pyenv.这将从 PATH 中删除 Pyenv shims 目录,并且像python这样的未来调用将执行系统 ​​Python 版本,就像 Pyenv 之前一样。

    pyenv will still be accessible on the command line, but your Python apps won't be affected by version switching. pyenv仍可在命令行上访问,但您的 Python 应用程序不会受到版本切换的影响。

  2. To completely uninstall pyenv, perform step (1) and then remove its root directory.要完全卸载pyenv,请执行步骤(1),然后删除其根目录。 This will delete all Python versions that were installed under $(pyenv root)/versions/ directory:这将删除所有安装在$(pyenv root)/versions/目录下的Python 版本

     rm -rf $(pyenv root)

    If you've installed Pyenv using a package manager, as a final step perform the Pyenv package removal.如果您已经使用包管理器安装了 Pyenv,作为最后一步,请执行 Pyenv 包删除。 For instance, for Homebrew:例如,对于 Homebrew:

     brew uninstall pyenv

None work for me (under brew) under Mac Cataline.在 Mac Cataline 下,没有一个对我有用(在 brew 下)。

They have a warning about file missing under .pyenv .他们有关于.pyenv下文件丢失的警告。

(After I removed the bash_profile lines and also rm -rf ~/.pyenv , (在我删除bash_profile行和rm -rf ~/.pyenv

I just install Mac OS version of python under python.org and seems ok.我只是在python.org下安装了 Mac OS 版本的 python,看起来没问题。

Seems get my IDLE work and ...似乎让我的空闲工作和......

尝试使用以下命令删除它:

brew remove pyenv

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

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