10
votes

I have just installed Anaconda 3.7 in Windows 10. Then I have created a new env for tensorflow and installed it there. It got installed without any problem. Then I used the command conda install -c conda-forge keras to install Keras. While Keras installation was running, Anaconda Prompt crashed suddenly. I restarted it and I tried to activate my tensorflow env; but as soon as I try to activate it, Anaconda Prompt crashes!! Please take a look at my screenshot. How can I fix this? Thank you very much for your support. Ferari

Anaconda Prompt Crashes

6

6 Answers

7
votes

The problem could be due to the version of tensorflow - tensorboard mismatch. When you give the command conda install -c conda-forge keras for installing keras, the tensorflow and tensorboard versions gets changed.

I tried the following steps and it worked fine for me.

  • conda create -n tf python=3.6
  • activate tf
  • conda install keras

Installing keras will automatically install tensorflow.

4
votes

I just had an issue with the same symptom. Instead of printing the error message, the activation of the conda environment exited the console application.

The scripts that run on activation can be found in ./etc/conda/activate.d inside the environment. The path to the environments can be found using conda env list. Check these scripts for any 'exit' commands, commenting them out if necessary. This should let you at least see the error message.

In my case the issue was caused by packages requiring MSVC compiler, and Visual Studio studio was not installed.

2
votes

I was also facing the same error and i have resolved it by re creating the conda environment. It is happening due to version mismatch between couple of packages. Just delete the conda environment and re-create the environment but this time do not add tensorflow GPU package instead just add keras-gpu, it will take care everything.

I did the following things:

  1. deleted the same env

  2. created the same environment using

conda create -n myEnv python==3.6

  1. install keras gpu

conda install -c conda-forge keras-gpu

now it will install necessary packages and then you can activate the environment and use it

1
votes

I encountered the same problem. Solved by creating a new env and using

conda install -c hesi_m keras

This will install the latest versions of Keras and Tensorflow.

Turns out you will most likely get an outdated version of keras if you installed it with conda install -c conda-forge keras.

0
votes

Same problem here..

I just have installed tensorflow-gpu in tf-gpu environment using

conda install tensorflow-gpu

It has successfully installed and works perfectly. But after installation whenever I am going to use environment by this command

activate tf-gpu

it shows the followingenter image description here output and close the command prompt soon. I am using anaconda for python 3.6.

0
votes

when you open Anaconda command prompt just press ctrl+c and press Y to avoid the crash for now and then start again with the task of setting the environment for tensorflow... this worked for me..