Issue
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?
Solution
(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.
Answered By - Carlos Cordoba
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.