I am currently running python 3.6 on my Mac, and installed the latest version of Python (3.11) by downloading and installing through the official python releases. Running python3.11
opens the interpreter in 3.11, and python3.11 --version
returns Python 3.11.0
, but python -V
in terminal returns Python 3.6.1 :: Continuum Analytics, Inc.
.
I tried to install again via homebrew using brew install python@3.11
but got the same results.
More frustrating, when I try to open a virtual environment using python3 -m venv env
I get
Error: Command '['/Users/User/env/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
I altered .bash_profile
with
# Setting PATH for Python 3.11
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.11/bin:${PATH}"
export PATH
. "$HOME/.cargo/env"
And created a .zprofile
based on this post with
export PYTHONPATH=$HOME/Users/User
and a .zshrc
based on this post, but --version
still throws python3.6
.
I'm running Big Sur OS. Pip and homebrew are up to date and upgraded. Acknowledging that I'm totally foolish, what do I need to do to get python >3.7 running in terminal?