1

I installed the last version of conda, anconda and spyder, that provides python 3.6. Whereas most of my codes can run with python3, some of my libs needs python2.

I assume there is an easy way to change from 3.6 to 2.7 when launching spyder.

From Switch between spyder for python 2 and 3

I created an environment in python 2.7 using conda, called python2. Then, after

source activate python2
spyder

the instance of spyder that launches still show in the console :

Python 3.6.4 |Anaconda custom (64-bit)| (default, Jan 16 2018, 18:10:19)

I'm using Spyder 3.2.8, and Conda 4.5.2

I think what I want to do is pretty clear : what is the simplest way to do it ?

Liris
  • 1,399
  • 3
  • 11
  • 29
  • why don't you use a virtual environment? Or you can also use a container to isolate your application – lmiguelvargasf May 11 '18 at 16:41
  • I might need more details about "virtual environment" or container. I'm using spyder ton run scripts that are managing some physical data. – Liris May 11 '18 at 16:52
  • 2
    @lmiguelvargasf The OP _is_ using a virtual environment. That’s what the `activate` command does, and it’s what the linked question is all about. – abarnert May 11 '18 at 16:58
  • 2
    Have you installed Spyder into the Python 2 environment? If not, the `spyder` command will find the global version, which comes from your default 3.6 environment. This is explained in the answer that you linked to, so if that’s your problem, just read that answer (and we can close this one as a dup). If you’re sure you have `spyder` installed in your Python 2 environment, then we’ll need some more info to debug things, starting with `pip list |grep spyder` and `which -a spyder` and maybe an `ls` of the environment’s `bin` directory (all with the Python 2 env activated). – abarnert May 11 '18 at 17:01
  • You were right. I saw that in the other answer, but as an instance of spyder was starting, I tought it was installed also in the other environment. Thanks – Liris May 12 '18 at 07:25

0 Answers0