简体   繁体   中英

Python versions and pyenv

I installed python3 using homebrew, but I stumbled upon many posts mentioning that it is better to use pyenv to manage different python versions. However, I have not found a post that answers my question:

Should I uninstall python3, install pyenv, and then reinstall python3 using pyenv? Or should I just install pyenv now, would this work?

Below is output from terminal:

System python

python --version
Python 2.7.18

which python
/usr/bin/python

Python3

python3 --version
Python 3.9.10

which python3
/opt/homebrew/bin/python3

From https://justinmayer.com/posts/homebrew-python-is-not-for-you/

Homebrew's Python is not for you. It exists to serve Homebrew, or more accurately, Homebrew's other formulae. The primary purpose of Homebrew's Python formula is to enable other Python-dependent Homebrew packages to work. If installing Homebrew's Python allows you to run the occasional Python script or access the REPL, that's a nice side benefit, but anything beyond that — including developing software with Python — is squarely out-of-scope.

You can run brew uses --installed python to check if any installed packages depend on Homebrew Python. If no packages are listed, then you can safely uninstall via brew uninstall python and use pyenv instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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