简体   繁体   中英

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?

When in doubt, try installing via pip:

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

pip install keras

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM