These are chat archives for spyder-ide/public

29th
Dec 2018
Samson Daniel
@SamsonCodes
Dec 29 2018 06:48
Hello, I was wondering if you could help me run Python 2.7 on Spyder instead of the 3.7 version it runs now and allow for switching between the two.
Same for Jupyter Notebook which is currently running Python 3 according to the interface
Samson Daniel
@SamsonCodes
Dec 29 2018 07:28
Never mind, got it. For those with the same problem, just install Python 2.7 then go to Anaconda Navigator and switch to Applications on py27 in the dropdown menu. Then install and run and shout in excitement.
Samson Daniel
@SamsonCodes
Dec 29 2018 08:46
Then sigh in exasperation when you find out you still can't follow along with the tutorial because the Jupyter Notebook doesn't have numpy, and the other libraries. Anyone could help with that?
CAM Gerlach
@CAM-Gerlach
Dec 29 2018 17:16
@SamsonCodes You could switch your base environment to Python 2.7 with conda install -n base python=2.7, but that's not recommended. Instead, you can create a new Python 2.7 environment with conda create -n python27-env python=2.7 (replace python27-env with a name of your choice); activate it, install spyder-kernels with conda install spyder-kernels=0 to enable full Spyder functionality with the env, and then install your desired packages (conda install numpy scipy pandas matplotlib etc. ). Finally, you can just select the python executable under Anaconda3/envs/ for your new environment under Python Interpreter > Use the following Python Interpreter in Spyder's preferences, and new Consoles will open in that Python 2.7 environment.
You can then switch back and forth between different environments at any time, and even work with Consoles in many different environments (or even Python installs or remote machines) simultaneously. For full details, see our comprehensive Guide to Managing Packages and Environments in Spyder.
Also, be advised that Python 2.7 is finally end of life in exactly one year, and many scientific Python packages have already dropped support for it or will be doing so in the next few weeks.