I am using python version 3.10.2 but I want to downgrade to 3.9 because it is not compatible with a library in my project. How can I do this with terminal command?
So when I type python3 --version my version is 3.10.2 I want to downgrade it. IDE is pycharm
Install pyenv with Homebrew on macOS:
brew update
brew install pyenv
Define your vitual env variables:
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
Restart your shell so the path changes take effect
exec "$SHELL"
Check the available python versions:
pyenv install --list
Install the required python version:
pyenv install 3.9
Set it as your global version:
pyenv global 3.9
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With