how to uninstall pyenv(installed by homebrew) on Mac
Asked Answered
M

3

54

I used to install pyenv by homebrew to manage versions of python, but now, I want to use anaconda.But I don't know how to uninstall pyenv.Please tell me.

Mouldon answered 11/8, 2018 at 6:44 Comment(0)
B
106

From the docs:

Uninstalling pyenv

The simplicity of pyenv makes it easy to temporarily disable it, or uninstall from the system.

  1. To disable Pyenv managing your Python versions, simply remove the pyenv init line from your shell startup configuration. This will remove Pyenv shims directory from PATH, and future invocations like python will execute the system Python version, as before Pyenv.

    pyenv will still be accessible on the command line, but your Python apps won't be affected by version switching.

  2. To completely uninstall pyenv, perform step (1) and then remove its root directory. This will delete all Python versions that were installed under $(pyenv root)/versions/ directory:

    rm -rf $(pyenv root)
    

    If you've installed Pyenv using a package manager, as a final step perform the Pyenv package removal. For instance, for Homebrew:

     brew uninstall pyenv
    
Boldt answered 11/8, 2018 at 7:0 Comment(4)
Don't forget to remove the relevant lines from your shell environment configHallucinogen
1. says, "perform step (1) and then remove its root directory." What is step (1)?Raptor
@Raptor From the docs: “remove the pyenv init line from your shell startup configuration.” Edited to clarify.Tuneless
Here are the lines I commented out on my ~/.bashrc file: gist.github.com/devmi/30a14f74de382251a95e349cade513d7Epact
E
7

Try removing it using the following command:

brew remove pyenv

Ensoul answered 11/8, 2018 at 6:49 Comment(1)
Thanks very much for your quick answer!Mouldon
U
4

None work for me (under brew) under Mac Cataline.

They have a warning about file missing under .pyenv.

(After I removed the bash_profile lines and also rm -rf ~/.pyenv,

I just install Mac OS version of python under python.org and seems ok.

Seems get my IDLE work and ...

Umbrageous answered 18/11, 2019 at 4:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.