How to ensure that Spyder runs within a conda environment?

I issued the command where spyder within the active environment to check the locations of Spyder's executables. This returned

C:\Anaconda3\Scripts\spyder.exe
C:\Anaconda3\envs\testenv\Scripts\spyder.exe

So I started Spyder by typing the full path of the second entry, and my program ran without errors.


You can also use the Windows based link that is generated in the Windows menu. The steps:

  1. (in anaconda:) activate testenv

  2. (in anaconda testenv:) conda install spyder

  3. Look up the windows menu "recently added", find spyder (testenv) and [add that to taskbar] and / or [look up the file source location] and copy that to your desktop. In my case, the latter approach opened the directory C:\Users\USER\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Anaconda3 (64-bit) where the spyder links for any of my environments could be found; you can then copy them to your desktop for a direct start without the need to open anaconda prompt.