[英]Anaconda Keras Installation issue
I am trying to install keras using my conda environment. 我正在尝试使用conda环境安装keras。 I have been instructed to install the keras with Tensorflow backend using the following command: 我被指示使用以下命令在Tensorflow后端安装keras:
install -c hesi_m keras 安装-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. CondaVerificationError:位于/home/usama/anaconda3/pkgs/keras-preprocessing-1.0.1-py36_0的用于keras预处理的程序包似乎已损坏。 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. 找不到软件包清单中指定的路径'lib \\ python3.6 \\ site-packages \\ Keras_Preprocessing-1.0.1-py3.6.egg-info \\ PKG-INFO'。
CondaVerificationError: The package for keras-preprocessing located at /home/usama/anaconda3/pkgs/keras-preprocessing-1.0.1-py36_0 appears to be corrupted. CondaVerificationError:位于/home/usama/anaconda3/pkgs/keras-preprocessing-1.0.1-py36_0的用于keras预处理的程序包似乎已损坏。 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. 找不到软件包清单中指定的路径'lib \\ python3.6 \\ site-packages \\ Keras_Preprocessing-1.0.1-py3.6.egg-info \\ SOURCES.txt'。
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: 如有疑问,请尝试通过pip安装:
Go into your environment where you have TensorFlow installed and run this: 进入安装了TensorFlow的环境,然后运行以下命令:
pip install keras
Just google the keywords 只是谷歌关键字
"conda install keras". “ conda安装keras”。
You will get the commands to install keras directly. 您将获得直接安装keras的命令。
For example: 例如:
open your teminal and paste the following: 打开您的终端并粘贴以下内容:
conda install -c conda-forge keras
1) Update conda 1)更新conda
Run the anaconda prompt as administrator 以管理员身份运行anaconda提示
conda update -n base -c defaults conda
2) Create an environment for python new version say, 3.6 2)为python新版本创建一个环境,例如3.6
conda create --name py36 python=3.6
3) Activate the new environment 3)激活新环境
conda activate py36
4) Upgrade pip 4)升级点
pip install --upgrade pip
5) Install tensorflow 5)安装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, 如果您在环境位置出现转盘问题,或pywrap_tensorflow问题,
pip install tensorflow --upgrade --force-reinstall
Then, try 然后,尝试
pip install keras
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.