Day2:在Anaconda上安装Tensorflow以及Keras

  上篇明白到目前Tensorflow的状况如何,是时候重新建立环境了,我使用Anaconda建立环境,在下载Keras的时候,出现问题:

UnsatisfiableError: The following specifications were found to be incompatible with the existing python installation in your environment:

Specifications:

- keras -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0']

Your python: python=3.8

If python is on the left-most side of the chain, that's the version you've asked for. When python appears to the right, that indicates that the thing on the left is somehow not available for the python version you are constrained to. Note that conda will not change your python version to a different minor version unless you explicitly specify that.

  上面bug大意就是,Keras必须要用Python3.7版本才可以,无法使用最新的3.8版本。可是这警告让我感到很奇怪,Python怎麽可能会不管机器学习这麽重要的环境,就提升版本。
  我查了如果不是透过Anaconda建立环境,而是直接用Python,3.8版本可以建立Keras的环境,但我还是想要在Anaconda上使用Python,因此就用了以下两个指令:

pip install --target=anaconda3/envs/Keras38/lib/python3.8/site-packages tensorflow
pip install --target=anaconda3/envs/Keras38/lib/python3.8/site-packages keras
  • pip:python管理工具
  • install:安装
  • --target:指定放到哪个位置
      一般来说都是放在anaconda3/envs/(环境名称)/lib/python(版本)/site-packages这个位置,如果CMD设定上的位置不是在anaconda3的话,则需要前面加上其他位置。最後则加上tensorflow或keras,表示要下载什麽,就会开始下载了。
      依据这操作就能在Anaconda上安装最新版本的Tensorflow以及Keras。

<<:  予焦啦!产出可执行档

>>:  [Day11] Esp32s用AP mode + LED

Day-13 发动了革命的童养媳少女!打开 PlayStation 於新电视上重启革命之光

这部 SONY 进军游戏界的主机 PlayStation、以下简称为 PS。向来行不改名坐不改姓、从...

路由把关者- Navigation Guards

前言 Vue Router 提供 Navigation Guards,可以在路由变更前後去呼叫相关的...

D27 - 彭彭的课程# Python 实体物件的建立与使用 - 下篇 - 实体方法 - Instance Method(1)

今天雨弹狂炸 交通真的是有够不便QQ 希望可以快点发明像多拉A梦的道具弄个什麽就不会淋到雨的产品 好...

如何使用 Github Actions 自动部署 Angular 到 Github Pages

Github 多了一个 Actions 的新功能,当 push 档案到 Github 的时後,就会自...

虹语岚访仲夏夜-15(打杂的Allen篇)

小七离开便利商店後,店员『太子』走了过来... 「Allen 我觉得你走到那,都有灾难。」 我看了看...