Installing keras makes tensorflow can't find GPU
See original GitHub issueI have used keras + tensorflow-gpu in my old computer, it’s very ok. (I forget the tensorflow version)
I install keras with tensorflow-gpu (version 1.0.1) in my new computer, and before install keras, tensorflow can find my GPU. But after install keras, tensorflow only can find CPU. (use $ pip3 install keras)
I use these code to check GPU:
from tensorflow.python.client import device_lib
device_lib.list_local_devices()
$ nvidia-smi
And I tried to install keras from source ($ python setup.py install), it would have some error and install fail.
...
Installed /home/thisray/keras-test/lib/python3.5/site-packages/Keras-2.0.0-py3.5.egg
Processing dependencies for Keras==2.0.0
Searching for tensorflow
Reading https://pypi.python.org/simple/tensorflow/
No local packages or working download links found for tensorflow
error: Could not find suitable distribution for Requirement.parse('tensorflow')
Is this problem about version ?
thanks
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Keras tensorflow backend does not detect GPU - Stack Overflow
I was able to solve the issue by installing tensorflow again with pip install tensorflow-gpu . From keras GitHub issue: github.com/fchollet/ ...
Read more >Solution to TensorFlow 2 not using GPU - Medium
Making TensorFlow 2 code or Keras code run on GPU. This article addresses the reason and debugging/solution process to solve the issue of ......
Read more >How to Install TensorFlow and Keras with GPU support on ...
In this post, you will learn how to install TensorFlow and Keras with GPU support on windows. We will go through step by...
Read more >How to correctly install Keras and Tensorflow - ActiveState
Click to install Keras and Tensorflow together using pip. ... To install TensorFlow for CPU and GPU processors, run the following command:
Read more >How to Install the Latest TensorFlow Keras with a GPU without ...
In this video, I show how to install the latest version of TensorFlow with full GPU support. Though CONDA allows this install with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for your explanation. After: install tensorflow -> install keras -> uninstall tensorflow -> install tensorflow and it works! Thanks a lot!
Yeah, currently when you install Keras using pip or pip3 it blows off existing TF and installs the default, non-GPU version. It’d be great if there was a flag to not touch existing TF.
The workaround is to uninstall TF after installing Keras, and then installing the GPU version using pip or pip3 depending on your preferred python version. Not very elegant, but you gotta do what you gotta do.