Tanakorn Taweepoka
Tanakorn Taweepoka

Reputation: 197

How to install keras module in python 2 environment conda?

I've already installed keras. It works in python 3 using spyder in conda. But when I run in python 2 (which is installed in an environment), it has an error ImportError: No module named keras.layers.core and when I try to install keras by using command prompt it said that I've already installed.

Upvotes: 3

Views: 4551

Answers (1)

paolof89
paolof89

Reputation: 1349

To simplify the management of different environments in the same machine I use Conda. Create a new conda environment and specify the python version

conda create --name your_env_name python=2.7

Then activate the environment with

activate your_env_name

or

source activate your_env_name 

Now you can install keras in a new environment with

pip install keras

Upvotes: 3

Related Questions