当前位置: 代码迷 >> 综合 >> conda安装库时报错failed with initial frozen solve. Retrying with flexible solve.
  详细解决方案

conda安装库时报错failed with initial frozen solve. Retrying with flexible solve.

热度:19   发布时间:2024-01-26 12:23:16.0

conda安装库时报错:

conda install keras
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.

解决方案:

conda config --set channel_priority flexible

然后就正常运行了(换了更加灵活的方式???)

conda install keras
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done## Package Plan ##environment location: E:\Apps\Anaconda3added / updated specs:- kerasThe following packages will be downloaded:package                    |            build---------------------------|-----------------tensorflow-base-1.15.0     |mkl_py37h190a33d_0        36.2 MB------------------------------------------------------------Total:        36.2 MBThe following NEW packages will be INSTALLED:keras              pkgs/main/win-64::keras-2.2.4-0keras-base         pkgs/main/win-64::keras-base-2.2.4-py37_0The following packages will be DOWNGRADED:tensorflow                       2.0.0-mkl_py37he1bbcac_0 --> 1.15.0-mkl_py37h3789bd0_0tensorflow-base                  2.0.0-mkl_py37hd1d5974_0 --> 1.15.0-mkl_py37h190a33d_0tensorflow-estima~                     2.0.0-pyh2649769_0 --> 1.15.1-pyh2649769_0Proceed ([y]/n)? y

看了一下安装过程,好像是keras基于底层是tensorflow1.5,呃。。。

然后就放弃了keras,重构了下代码,用tensorflow.keras代替了keras。大部分的keras在tensorflow.keras都有,有些不能直接对应的自己去网上查查就行了。

  相关解决方案