Here is how I got Tensorflow version 2.5.0 to install and import using python version 3.6.8, with Thonny version 3.3.7, on a windows 10 laptop;-
When I installed Thonny, the default python interpreter was set to python 3.7.9. I need to change that, as follows;-
Using Thonnys menus and options , use tools / options / interpreter . Use the pull down option selections to find the python 3.6.8 that must have been previously installed on your machine. On my machine it is located at C:\Users\XXXX\ApplicationData\Local\Programs\Python\Python36\python.exe
Hit Ok and Thonny will show that it is now using python 3.6.8 in the lower shell !
Then install tensorflow using the Thonny menu tools / manage packages.
I installed tensorflow version 2.5.0 without any problems !
Then, in the interactive shell, I tested it ;-
Python 3.6.8 (C:\Users\con_o\AppData\Local\Programs\Python\Python36\python.exe)
import tensorflow
2021-05-20 09:06:01.231885: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2021-05-20 09:06:01.258437: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
print(tensorflow.version)
<module 'tensorflow._api.v2.version' from 'C:\Users\XXX\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\_api\v2\version\init.py'>
print(tensorflow.version)
2.5.0
Note;- The last command print(tensorflow.version) does NOT work without the previous command print(tensorflow.version) being run first !!
Note;- I could only install version 2.5.o of tensorflow. Thonny could not install any earlier version of Tensorflow!
I hope this helps the many folk struggling with the very difficult Tensorflow installations.