question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Keras installation with conda issues

See original GitHub issue

I have an issue with the installation of Keras with conda package manager. There are several channels where keras is hosted, the most popular one being conda-forge. When using cond-forge, a script is added and launched when activating a virtual environment where the variable KERAS_BACKEND is set to theano by default, overwriting any configuration in the keras.json file.

The second issue come when installing keras with the default channel conda install keras. Here again, an environment variable KERAS_BACKEND is set to theano by default, but I did not found where it is set. The only workaround I found was to tweak the keras.backend.__init__.py file and commenting the environment variable import.

My question is then, do you work with conda to package keras or is it their own initiative ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
shekhar-banerjee96commented, Feb 19, 2019

I am facing the same problem. At first i used this command conda install -c conda-forge keras tensorflow but the command prompt closes abruptly diplaying this code

python %CONDA_PREFIX%\etc\keras\load_config.py > temp.txt
set /p KERAS_BACKEND=<temp.txt
del temp.txt

:: Try to use the default Keras backend.
:: Fallback to Theano if it fails (Theano always works).
python -c "import keras" 1> 2>&1
if errorlevel 1 (
    ver > nul
    set "KERAS_BACKEND=theano"
    python -c "import keras" 1> 2>&1

I used this link to solve the problem ,

https://stackoverflow.com/questions/53483685/keras-breaks-anaconda-prompt?noredirect=1&lq=1

But now none of the conda integrated Ides would open. Could any one explain me what exactly am i missing ??? (VStudio and Jupyter). I am using Anaconda distibution on windows.

0reactions
rchiodocommented, Apr 16, 2019

I believe this is the root cause of an issue we’re having in the VS Code python extension as well: https://github.com/Microsoft/vscode-python/issues/5259

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with Keras installation in Anaconda - Stack Overflow
I ran the command conda install -c conda-forge keras and then after that, I pressed y when the prompt appeared asking me to...
Read more >
How to install Keras in Anaconda - Educative.io
Keras is a high-level, neural network API written in Python. It is not a viable option in Anaconda to pip install keras so...
Read more >
Installing a Python Based Machine Learning Environment in ...
Make sure you install Anaconda to the current user else you might face problems down the road. Skip this step. We will get...
Read more >
Keras - Installation - Tutorialspoint
We believe that you have installed anaconda cloud on your machine. If anaconda is not installed, then visit the official link, www.anaconda.com/distribution and ......
Read more >
Installing TensorFlow/Keras CPU/GPU w/CONDA (July, 2020)
This video shows how to set up a CONDA environment containing Keras /Tensorflow and several useful machine learning libraries.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found