Using Spyder in multiple virtual environment

Hello Anaconda Community,

I’m using Spyder, installed in the base. I discovered the existance of multiple environment when reading documentation to install a new class, and now I’m getting confused about that.

I tried to create a new environment using conda create -c conda-forge -n $NAME-env
Then I wanted to install the spyder-kernel to linked it to spyder by typing conda activate $NAME and then conda install spyder-kernels. This worked without error. But when I open Spyder, and change Python Interpreter to the new environment one in preferences I get this error Error while finding module specification for 'spyder_kernels.console' (ModuleNotFoundError: No module named 'spyder_kernels')

Does anyone have an advise regarding this problem ?

Also, I have a few more questions regarding this:

  • Is it correct to have Spyder in base, and create a new environment to each project or should I re-install a new version of Spyder in each environment ? The second option looks weird to me…
  • How should I do if I want to update my Python version ? Because it seems Spyder is somwhow associated to a version of Python -as writted in the top bar “Spyder (Python X.X)”

Thanks in advance for your help!