1

I've tried several of the other suggestions/answers on this exact topic.

I used Spyder-kernel 2.0.5 with Spyder 5.0.5 with Python 3.9.6.

The env activation process and kernel install process completes normally, (also tells me I have all the requested items).

The next start of Spyder 5.0.5 reports Your Python environment or installation doesn't have the spyder-kernels module or the right version of it installed.....

Do I need different version combinations of Python, Spyder, & Kernels?

Forest 1
  • 106
  • 1
  • 3
  • 16

2 Answers2

0

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).

FraSchelle
  • 249
  • 4
  • 10
  • NB: The tensorflow version using the second method is '2.6.0'. Obviously, tensorflow is not required to make spyder works inside the virtual environment – FraSchelle Apr 20 '22 at 09:41
0

I had reinstalled python (downgraded it) and faced the same problem. I had tried pip install spyder‑kernels but it didnt work. u should do pip uninstall spyder‑kernels probably twice!! the problem seems to be even when it seems to be in new python environment but rechecks the spyder‑kernels from the default spyder path. so I uninstalled it twice then installed it.

Farhang Amaji
  • 742
  • 11
  • 24