In case it helps, I made it working using mamba and calling (this installs tensorflow as well).
Chossing the python and spyder-kernels versions
mamba create --name tf python==3.7 tensorflow spyder-kernels==2.0.5
(change tf
to your favorite virtual environment name)
At home, it works on Spyder 5.0.1 using IPython 7.31.1.
I did not reusse to make it working usinf conda, but I may have not tried all possibilities.
To run Spyder in a given virtual environmene, please follow this anwser : How to run Spyder in virtual environment?
Get the last available versions
Install spyder inside the virtual environment directly:
mamba create --name tf tensorflow spyder
(it will ask for erasing the previously constructed tf
environment in case you ran the first command)
Then activate the environment and run spyder:
mamba activate tf
spyder
You do not need to change the path of the Python interpreter in spyder in that case, since it is embarked inside the virtual environment.
The first lines of the IPython console are then
Python 3.9.12 (main, Apr 5 2022, 06:56:58)
Type "copyright", "credits" or "license" for more information.
IPython 8.2.0 -- An enhanced Interactive Python.
on Spyder 5.1.5 (on 2022/04/20).