How to Downgrade Python Version
Recently, I learned that TensorFlow runs only on Python 3.4, 3.5, or 3.6 for Python3 version. If you download Anaconda 5.3.1, it will install Python version 3.7. Therefore, you have to downgrade your Python version. In Windows, you can do do the following:
First, you have to check the availability of all downloadable Python versions:
This will give you such results:
Finally, downgrading can be easily done by executing this command:
Nope, you’re not done. Please check if you numpy is working. If it gives you ImportError multiarray, you have to delete the numpy (most likely manually) and reinstall numpy with pip.
How to install an older version of python
How can I install python 3.4 (Windows version) when a newer version (3.5.1) is now available. My app specifically is looking for 3.4. I can’t seem to find a download for any of the older versions.
![]()
7 Answers 7
All the answers here are outdated since Python.org doesn’t host installers for older versions of Python anymore, only source code. And building Python on Windows is not really a walk in the park.
My solution: Pyenv.
It’s crossplatform (Linux, MacOS, Windows: where it’s called pyenv-win ), and you can with it automatically install among a very large list of Python versions.
There aren’t ALL python versions existing but the list is already very big.
Downgrade Python Version

Python is maintained and updated regularly. Some new features are added on every update, and some old ones may get deprecated.
Some updates are major, while others might include minor changes. The code written in a specific Python version may or may not be compatible with other versions (the main example being the difference between Python 2 and Python 3).
This tutorial will demonstrate how to downgrade Python according to our needs on different devices. We will discuss methods for Windows, Linux, and Mac devices.
Downgrade Python Version on Windows
Reinstall to Downgrade Python on Windows
The first few methods involve uninstalling the current version of Python and installing the required version. There are several ways to achieve this.
The first method involves uninstalling the current Python version from the Control Panel. We can search for the Add or Remove Programs application in the Control Panel.
This application contains a list of all the programs installed on the device. We can select the installed version of Python from this list, right-click to select the uninstall option, and follow the steps.
Another way to uninstall the installed version of Python is by using the Python package installer used earlier to install Python. We get the repair and uninstall options on running the Python package installer.
We can click on the uninstall option and proceed with the required steps.
After using any of the previous methods, it is necessary to delete the Python files available in the directory of the same name (usually found in the C:\Program Files directory). It is also necessary to make sure that the path from the environment variable is removed.
After carrying out the uninstallation of Python, we can install the required version and download its package installer application from the official website of Python.
Use a Virtual Environment to Downgrade Python on Windows
Python allows us to create different virtual environments. Each virtual environment can have its required version of Python interpreter and packages.
To create a virtual environment, we can use the command pip install virtualenv on the command prompt. We need to download the required version from the official website.
After this, we need to execute virtualenv \pathof\the\env -p \pathof\the\python_install.exe . The former path is the path where we wish to store the environment, and the latter is the path where the installer is present.
Use Anaconda Prompt to Downgrade Python on Windows
This method is limited to the users of Anaconda Navigator. On the Anaconda prompt, we can install the required version of Python and overwrite the previous version using the conda install python= version command.
It is necessary to check if this version is available or not by running the conda search python command and checking for the available versions.
We can also create a new environment very easily in Anaconda. We can run the conda create —name env_name python=python_version command to create an environment.
Downgrade Python Version on Linux
Reinstall to Downgrade Python on Linux
We can remove and install the required version of Python to downgrade it. First, we need to download the package from the official website and install it.
Then, we need to go to the Frameworks\Python.framework\Versions directory and remove the version which is not needed. We will run the sudo rm -rf python_version command in this directory to remove this version.
Use Pyenv to Downgrade Python on Linux
Pyenv allows us to switch between different versions of Python by creating environments.
We can install the required version of Python using the pyenv install python_version command on the terminal. After that, we can view the available versions using the pyenv versions command.
To set the required version as the Python version for the local environment, we can use the pyenv local python_version command.
Next, we can switch to a different folder and set the required Python version globally. To set the version globally for a user, we use the pyenv global python_version command.
Use Homebrew to Downgrade Python on Linux
Homebrew is an application manager that can manage and install open-source applications. It is available on macOS and Linux.
We can clone to the repository of our required version of Python and unlink the previous version using a set of simple commands. These are shown below.
Use Anaconda to downgrade Python on Linux
Anaconda is also available on macOS and Linux devices. We can follow the steps discussed in the previous section of Downgrade Python on Windows and use them for these devices.
Downgrade Python Version on macOS
On macOS, we can use the methods involving Pyenv, Homebrew, and Anaconda discussed in the previous section. These methods are valid here as well.
Manav is a IT Professional who has a lot of experience as a core developer in many live projects. He is an avid learner who enjoys learning new things and sharing his findings whenever possible.
How to install older version of Python in Ubuntu 22.04?
I need to install an older version of Python to get some software to work. 3.9 is the newest version I can use.
Someone else had this issue and the answer was:
However this does not work and just gives an error that the 3.9 package can not be found.
So how can I remove 3.10 and get 3.9 instead? Thanks.
![]()
3 Answers 3
I encourage to install just your python dependencies using a python package, as this other question and answer suggest: How do I install a different Python version using apt-get?
![]()
Anaconda manages different versions of python and their packages by creating environments that are isolated.