gpt4 book ai didi

python - tensorflow 安装与 conda 冲突 - UnsatisfiableError

转载 作者:太空宇宙 更新时间:2023-11-03 15:10:29 27 4
gpt4 key购买 nike

尝试使用 conda 安装tensorflow,但抛出了规范冲突错误。我没有安装 python 3.5

conda install -c conda-forge tensorflow
Fetching package metadata ...............
Solving package specifications: .

UnsatisfiableError: The following specifications were found to be in conflict:
- python 3.6*
- tensorflow -> python 3.5*
Use "conda info <package>" to see the dependencies for each package.

python --版本Python 3.6.0::Anaconda 自定义(64 位)

我似乎无法在普通的 python IDE 上运行tensorflow,它说找不到模块。所以我安装了 Anaconda,除了 tensorflow 之外,一切看起来都很好。有办法安装吗?

最佳答案

您似乎正在 python3.6 环境上安装 python3.5 的tensorflow。我建议你为tensorflow创建一个单独的python环境。您可以按如下方式进行

conda create -n Tensorflow anaconda python=3.5

这将创建一个名为 Tensorflow 的 anaconda 环境并安装所有 anaconda 软件包。您还可以指定您选择的任何其他 python 发行版。确保根据您选择的 python 版本下载正确的 TensorFlow 发行版。

然后按如下方式激活新创建的anaconda环境

source activate Tensorflow

在 Windows 上

activate Tensorflow

这将切换 python 环境。然后继续使用 pip 安装 Tensorflow,如下

pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl

如果您希望安装支持 GPU 的 TensorFlow,则应安装 CUDA 工具包和 CUDNNv5.1。更多详情here

关于python - tensorflow 安装与 conda 冲突 - UnsatisfiableError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44240707/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com