10

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 ?

roganjosh
  • 12,594
  • 4
  • 29
  • 46
Larsa
  • 101
  • 1
  • 1
  • 4
  • See this answer, I thinks its solved [here](https://stackoverflow.com/questions/52584907/how-to-downgrade-python-from-3-7-to-3-6) – Farouk Sabiou Jan 25 '19 at 19:49
  • 2
    @FaroukS. None of those answers address "Windows" or "without using Anaconda" – roganjosh Jan 25 '19 at 19:54
  • 1
    You can download/install python 3.6 from official site https://www.python.org/downloads/. Then install the required packages like tensorflow. It's possible to install multiple versions of python on windows. – Tim Jan 25 '19 at 19:56
  • 1
    If your python 3.7 is a fresh copy, it's as simple as uninstalling 3.7 and then install 3.6. Otherwise, you might do a `pip freeze` to see what packages you have installed and `pip install` them again afterwards. – r.ook Jan 25 '19 at 19:57

3 Answers3

6

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

Edeki Okoh
  • 1,786
  • 15
  • 27
1

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.

ncw
  • 1,635
  • 1
  • 18
  • 26
-1

This solved it for me. Run the following via anaconda prompt

  1. conda create -n py36 python=3.6
  2. activate py36
  3. Select py36 on Anaconda navigator and launch spyder
  • I'm glad that you were able to find a solution that worked for you, but the original question was looking for a solution that did not use Anaconda. – Matthew Cox Dec 14 '20 at 16:58