So ode
So ode

Reputation: 31

Spyder crashing after installing Keras through Conda

I downloaded Anaconda on a PC. I would like to use TensorFlow and Keras. I know I have to use Python 3.6 and TensorFlow 1.0.9 (because of my code).

After installing Anaconda, I open my Anaconda prompt (in admin) and I put these instructions to create a new env:

conda create --name deeplearningaz python=3.6 anaconda
activate deeplearningaz
conda install theano
conda install tensorflow
conda install keras
conda update --all

I don't have any errors, but a warning about updating Conda version, and a few debug messages.

After that, I try to check if I'm using the correct version of Python, so I type (still in Anaconda prompt) and import keras (to see if it's ok):

python
import keras

Everything works perfectly fine. Then I type quit() and type spyder (to open the Spyder from the env in Python 3.6). Spyder opens, and if I type anything (import pandas, numpy et read a csv), then it crashes... for no reason (and no error).

After that, still in the Anaconda prompt, I try again to open Spyder and I get an error:

the error after Spyder's crash

I don't get the problem, I try again and again to uninstall and install anaconda (and checking if my file was really delete). I didn't find... I check the print(sys.path) and it looks like it's ok (but I don't see the env).

Does anybody have any idea?

I put here the conda info in the env (before the crash).

conda info

Upvotes: 2

Views: 528

Answers (1)

merv
merv

Reputation: 77100

I don't use Spyder, but based on this discussion about how they don't really support switching conda envs yet, it sounds like currently the correct way to get Spyder to use a Conda env is to launch Spyder from outside the env, and then change the Python interpreter (Tools > Preferences > Python Interpreter) to point to the python located inside the env you wish to use.

Or if you really don't care about space, simply install a new Spyder instance in the env (conda install -n deeplearningaz spyder), and then you should be able to launch within the env without issue.

Upvotes: 2

Related Questions