4

I am having issues installing spyder for python in a conda environment.

Spyder versions require specific Python versions and spyder-kernels. Yet I haven't been able to find information on which ones are needed.

From random blogs and questions on StackOverflow I know that Spyder >= 4 requires Python >= 3, and spyder-kernels at least 1.9 up (maybe lower, haven't tried all...)

For Python 2.7 I can only go as far as Spyder 3, but I can't find the proper Spyer-kernels to install.

Just doing conda install spyder, or conda install spyder=3 freezes and conda can't solve "inconsistencies".

Which spyder-kernels do I need for installing spyder3 in a python 2.7 environment?

hirschme
  • 774
  • 2
  • 11
  • 40

1 Answers1

4

(Spyder maintainer here) You said

From random blogs and questions on StackOverflow I know that Spyder >= 4 requires Python >= 3

This is incorrect. Spyder 4.1.5 is compatible with Python 2.7. We drop support for Python 2.7 in our 4.2.0 version, released in November 2020.

and spyder-kernels at least 1.9 up (maybe lower, haven't tried all...)

Here you can find the list of spyder-kernels versions that are necessary for different Spyder ones. That needs to be updated for Spyder 5, but we will do that soon.

For Python 2.7 I can only go as far as Spyder 3, but I can't find the proper Spyer-kernels to install.

There's a misunderstanding here. You can still use Spyder 5 (which only supports Python 3) and run your Python 2 code in a different environment with the latest spyder-kernels, which still supports Python 2.7.

For that, first you need to run the following commands

conda create -n py27 python=2.7
conda activate py27
pip install spyder-kernels

It's necessary to use pip to install spyder-kernels because Anaconda and Conda-forge stopped creating packages for Python 2 a long time ago.

Then you need to connect Spyder to that env by following these instructions.

Which spyder-kernels do I need for installing spyder3 in a python 2.7 environment?

You don't need to do that, according to what I mentioned above.

Carlos Cordoba
  • 33,273
  • 10
  • 95
  • 124
  • I was hoping you would answer, thanks for taking the time. I assume you forgot to include python=2.7 in the creation of the environment right? – hirschme May 17 '21 at 20:18
  • 1
    Sorry, I was busy last week. And my mistake about the Python version, I'll fix it right away. – Carlos Cordoba May 17 '21 at 22:38