在python2.7中安装在anaconda中的keras的冲突

问题描述 投票:0回答:1

当我输入conda install keras时,我收到此错误:

“unsatisfiabledError:发现以下规范存在冲突:-functools32 -keras”

我不知道如何修复错误,请帮助我。

命令:

(my_pymc_env) C:\Users\MSI>conda install tensorflow 
Solving environment: failed 
UnsatisfiableError: The following specifications were found to be in conflict: - functools32 - tensorflow 
Use "conda info <package>" to see the dependencies for each package.

(my_pymc_env) C:\Users\MSI>pip install tensorflow 
Collecting tensorflow 
Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow
deep-learning
1个回答
0
投票

所以keras需要张量流,换句话说,如果你成功安装没有张量流的keras,我会非常惊讶。您运行的命令输出告诉我们已经安装了qazxsw poi

当我运行functools32时,我发现最新版本的tensorflow需要:

conda info tensorflow

而我运行tensorflow 1.2.1 py36_0 ----------------------- file name : tensorflow-1.2.1-py36_0.tar.bz2 name : tensorflow version : 1.2.1 build string: py36_0 build number: 0 channel : https://repo.anaconda.com/pkgs/free/win-64 size : 21.0 MB arch : x86_64 constrains : () date : 2017-08-05 license : Apache 2.0 license_family: Apache md5 : 736b26f0b1b83caee9d260859c7d0714 platform : win32 subdir : win-64 url : https://repo.anaconda.com/pkgs/free/win-64/tensorflow-1.2.1- py36_0.tar.bz2 dependencies: backports.weakref ==1.0rc1 bleach ==1.5.0 html5lib ==0.9999999 markdown >=2.6.8 numpy >=1.11 protobuf >=3.2.0 python 3.6* six >=1.10.0 vs2015_runtime >=14.0.25420 werkzeug >=0.11.10 ,我看到:

conda info functools32

看看每个包的依赖关系,你会看到functools32 3.2.3.2 py27_0 -------------------------- file name : functools32-3.2.3.2-py27_0.tar.bz2 name : functools32 version : 3.2.3.2 build string: py27_0 build number: 0 channel : https://repo.anaconda.com/pkgs/free/win-64 size : 15 KB arch : x86_64 constrains : () date : 2015-12-15 license : PSF md5 : 481667a7378f804fa65e2e2e81415b27 platform : win32 subdir : win-64 url : https://repo.anaconda.com/pkgs/free/win-64/functools32-3.2.3.2- py27_0.tar.bz2 dependencies: python 2.7.* 需要python 3(tensorflow)而python 3.6.*需要python 2(functools32)。这些包需要两个不同版本的python,这意味着它们不能一起使用。

如果你想使用tensorflow或keras你需要提交到python 3,functools32是python 2中使用的库,所以我建议最好升级你的python版本。

© www.soinside.com 2019 - 2024. All rights reserved.