I have successfully installed keras after much struggle in the directory /usr/local/lib/python3.5/dist-packages(by deafult it has been installed there). But whenever i am trying to import or trying to modify the keras backend it says No mudule named keras. What am I doing wrong here and how will I modify the keras.json file in these current conditions?
Asked
Active
Viewed 1,605 times
0
-
What is the output of `python --version`? (And please copy the text to your answer; don't use screenshots) – Martin Thoma Dec 29 '16 at 19:47
-
it's showing me python 2.7 – Alapan Bag Dec 30 '16 at 06:07
2 Answers
0
What am I doing wrong here?
The problem is that you start Python 2, but you installed it for Python 3. Your system has likely both Python versions, but you installed it only for one.
If you want to start Python 3, try python3
:
python3 -c "from keras import backend; print(backend._BACKEND)"
How do I modify the keras.json file?
Open ~/.keras/keras.json
with the editor of your choice. For example:
nano ~/.keras/keras.json

Martin Thoma
- 124,992
- 159
- 614
- 958