Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can I downgrade from python 3.7 to 3.6 in windows

Tags:

python

I'm trying to install tensorflow but python 3.7 does not support that, so I want to get python 3.6 instead without using anaconda.

So any suggestion please ?

like image 600
Larsa Avatar asked Jan 25 '19 19:01

Larsa


2 Answers

I have done this multiple times.

My first tip is use virtual environments. That way you can use python 3.6 for what ever project requires that version of python, and python 3.7 for other projects that need that version.

However on windows these are the best steps:

1.) Uninstall python 3.7 from your computer using command prompt

2.) Double check in your program files folder to see if there are any lingering python 3.7 folders you need to delete. Do not delete any site-packages folders or you will need to reinstall the packages you have deleted.

3.) Go to https://www.python.org/downloads/ and download and install python 3.6 and make sure you add it to your path when installing

4.) Open command prompt and type python -V or simply python and check what version you have installed. If you type just python you can use the command exit() after to exit.

But I suggest starting to use Virtual Environments to avoid this issue or downloading different python versions based on specific library needs.

UPDATE

Regarding the point of not deleting site-packages folders. Some of your packages may not be compatible with lower versions of python. This may not be a huge issue for some people, but it is best to check your most commonly used packages to see their compatible python versions before continuing with the downgrade

like image 134
Edeki Okoh Avatar answered Oct 26 '22 04:10

Edeki Okoh


Consider using pyenv-win in order to manage your global and (per-project) local Python versions.

However, it only works with the Windows Subsystem for Linux.

like image 36
ncw Avatar answered Oct 26 '22 05:10

ncw