Friday, 14 May 2021

How to install a conda environment with Spyder and Python 2.7?

SOmething as simple as:

conda create -n py2 python=2.7

and then in that environment

conda install spyder=3

fails to solve for the environment. Although the only things here are python=2.7 basics and spyder=3, which on their own website specifies requires python 2.7 https://www.psych.mcgill.ca/labs/mogillab/anaconda2/lib/python2.7/site-packages/spyder/doc/installation.html#requirements

Why does this fail, and how can one get something that basic to work?

New attempts: (Last one are specific versions that I know work together, as I have them on my main system wide install).

conda create -n py2 python=2.7 spyder                    --> Fails to solve env

conda create -n py2 python=2.7 spyder -c free            --> installs spyder4

conda create -n py2 python=2.7 spyder=3 -c free          --> AttributeError on launch

conda create -n py2 python=2.7.17 spyder=3.2.3 -c free   --> AttributeError on launch

All fail. If I don't specify spyder=3, conda installs spyder=4, which is a no-go as those versions of python and spyder do not work together (why doesn;t conda know this when checking for compatibility?). When specifying spyder=3, environment fails to solve except when using channel free, as kindly suggested in the comments. But this method also fails when launching Spyder, throwing AttributeErrors.



from How to install a conda environment with Spyder and Python 2.7?

No comments:

Post a Comment