usamazf
usamazf

Reputation: 3215

Anaconda Keras Installation issue

I am trying to install keras using my conda environment. I have been instructed to install the keras with Tensorflow backend using the following command:

install -c hesi_m keras

But the problem is it downloads some packages and then errors outs follows:

Downloading and Extracting Packages:
keras_applications-1 |   45 KB | ############### | 100%
keras-2.2.0          |  444 KB | ############### | 100% 
keras-preprocessing- |   43 KB | ############### | 100% 
Preparing transaction: done
Verifying transaction: failed

CondaVerificationError: The package for keras-preprocessing located at /home/usama/anaconda3/pkgs/keras-preprocessing-1.0.1-py36_0 appears to be corrupted. The path 'lib\python3.6\site-packages\Keras_Preprocessing-1.0.1-py3.6.egg-info\PKG-INFO' specified in the package manifest cannot be found.

CondaVerificationError: The package for keras-preprocessing located at /home/usama/anaconda3/pkgs/keras-preprocessing-1.0.1-py36_0 appears to be corrupted. The path 'lib\python3.6\site-packages\Keras_Preprocessing-1.0.1-py3.6.egg-info\SOURCES.txt' specified in the package manifest cannot be found.

Remaining list of error is skipped. I have tried to clean the cache using:

conda clean --all

But the issue is persisting. Any ideas?

Upvotes: 1

Views: 4398

Answers (3)

Vaishnavi Bala
Vaishnavi Bala

Reputation: 129

1) Update conda

Run the anaconda prompt as administrator

conda update -n base -c defaults conda

2) Create an environment for python new version say, 3.6

conda create --name py36 python=3.6

3) Activate the new environment

conda activate py36

4) Upgrade pip

pip install --upgrade pip

5) Install tensorflow

pip install https://testpypi.python.org/packages/db/d2/876b5eedda1f81d5b5734277a155fa0894d394a7f55efa9946a818ad1190/tensorflow-0.12.1-cp36-cp36m-win_amd64.whl

If it doesn't work

If you have problem with wheel at the environment location, or pywrap_tensorflow problem,

 pip install tensorflow --upgrade --force-reinstall

Then, try

pip install keras

Upvotes: 0

PURNENDU MISHRA
PURNENDU MISHRA

Reputation: 443

Just google the keywords

"conda install keras".

You will get the commands to install keras directly.

For example:

open your teminal and paste the following:

conda install -c conda-forge keras

Upvotes: 1

reka18
reka18

Reputation: 8427

When in doubt, try installing via pip:

Go into your environment where you have TensorFlow installed and run this:

pip install keras

Upvotes: 1

Related Questions