close

How to downgrade python version from 3.9 to 3.8

Today We are Going To Solve How to downgrade python version from 3.9 to 3.8 in Python. Here we will Discuss All Possible Solutions and How this error Occurs So let’s get started with this Article.

How to downgrade python version from 3.9 to 3.8?

  1. How to downgrade python version from 3.9 to 3.8

    To downgrade python version from 3.9 to 3.8 just For Anaconda users. This method is only for Anaconda users. Just run the below command to switch back python 3.9 just run this command conda install python=3.9

  2. downgrade python version from 3.9 to 3.8

    To downgrade python version from 3.9 to 3.8 just For macOS. Here we will use pyenv with Homebrew to downgrade python from 3.9 to 3.8. brew update
    Install pyenv by below command and then install python 3.8: brew install pyenv
    pyenv install 3.8
    And then set the environment PYENV_VERSION to version of python you want to use just like below. Here we want to use python 3.8 that's why you can see this in the below command. pyenv shell 3.8

Solution 1 : For Anaconda users

This method is only for Anaconda users. Just run the below command to switch back python 3.9 just run this command

conda install python=3.9

Solution 2 : For macOS

Here we will use pyenv with Homebrew to downgrade python from 3.9 to 3.8.

brew update

Install pyenv by below command and then install python 3.8:

brew install pyenv
pyenv install 3.8

And then set the environment PYENV_VERSION to version of python you want to use just like below. Here we want to use python 3.8 that’s why you can see this in the below command.

pyenv shell 3.8

Conclusion

So these were all possible solutions to this error. I hope your error has been solved by this article. In the comments, tell us which solution worked? If you liked our article, please share it on your social media and comment on your suggestions. Thank you.

Also Read This Solutions

Leave a Comment