echo 'eval "$(pyenv init --path)"' >> ~/.zprofile echo 'eval "$(pyenv init -)"' >> ~/.zshrc source ~/.zprofile source ~/.zshrc
pyenv is a version manager for Python that allows you to easily install and manage multiple versions of Python on your system.
and follow the installation instructions. Make sure to select the option to add Python to your PATH during installation if available. mac os upgrade python
python3 -m pip install --upgrade pip
python3 --version # or python --version
Replace 3.11.0 with the desired version of Python. 3. : Set the global version of Python:
For most users: is simplest For version management: Pyenv method is most flexible For GUI installer: Official Python.org works fine echo 'eval "$(pyenv init --path)"' >> ~/
For more control over multiple Python versions on your system, consider using pyenv . First, install pyenv using Homebrew:
Verify the installation by typing python3 --version in your Terminal. 2. The Recommended Way: Homebrew python3 -m pip install --upgrade pip python3 --version
brew install python@3.12