KRISHNA TEJA
KRISHNA TEJA

Reputation: 61

How to install Keras in Python 3.6?

I'm having trouble installing the Keras library for Python 3.6. Whenever I try to install Keras, it is throwing an error and when I searched on the internet, Keras had been released for up to Python 3.5. Does anyone have a solution for this?

Upvotes: 5

Views: 23202

Answers (4)

Jose Kj
Jose Kj

Reputation: 2962

Follow this method if you have Anaconda and Python version 3.6.

First, create a new conda environment,

conda create -n keras python=3.5

Now activate it,

source activate keras

and install Keras,

conda install keras

Test if it works,

    $ python 
>>>import keras

You will get the following message if it was successful:

Using TensorFlow backend.

Click here to see Mike Müller's answer

Upvotes: 5

Nitin Bhore
Nitin Bhore

Reputation: 21

Try the following at a command prompt:

pip install --upgrade tensorflow
pip install --upgrade keras

Also, refer the following link for more detail:

https://www.tensorflow.org/install/pip

Upvotes: 1

yunus
yunus

Reputation: 2545

Follow the below steps , Tensorflow dosnt support py3.7 as of now , so 3.6 is better ,
I recommend using environment , (venv , conda(preferred) ),

For conda

conda create -n keras python=3.6
source activate keras
conda install tensorflow keras
#for faster installation
pip install keras


For virtualenv

virtualenv -p python3 keras
source keras/bin/activate
pip install keras tensorflow numpy

Upvotes: 1

LunaRivolxoxo
LunaRivolxoxo

Reputation: 330

I used sudo pip install keras to download.

I have both python 2.7 and 3.6 installed on my Mac. I used pip -V to check my python version of installation. Probably you used invalid version of python to download.

Screenshot of the install being done on my computer: Mac intallation screenshot

Upvotes: 2

Related Questions