lang/python/ AnacondaInstallSpyderInEnvironment1


See this stackoverflow question which refers to this official reference here.

  1. Spyder should be installed in the base environment.
  2. Activate the target environment (e.g. conda activate py39a).
  3. Install spyder-kernels (e.g. conda install spyder-kernels)
  4. find and copy the path for the python executable inside the environment (python -c "import sys; print(sys.executable)")
  5. deactivate the environment (e.g. conda deactivate)
  6. run Spyder
  7. Spyder→Tool→Preferences→Python Interpreter→Use the following interpreter→paste the environment python executable path.
  8. Restart the ipython console.