tensorflow安装与conda冲突-UnsatisfiableError [英] tensorflow install with conda conflict - UnsatisfiableError

查看:405
本文介绍了tensorflow安装与conda冲突-UnsatisfiableError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

试图使用conda安装tensorflow并引发规范冲突错误.我没有安装python 3.5

Tried to install tensorflow using conda and its throwing a spec conflict error. I do not have python 3.5 installed

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 --version Python 3.6.0 :: Anaconda自定义(64位)

python --version Python 3.6.0 :: Anaconda custom (64-bit)

我似乎无法在普通的python IDE上运行tensorflow,它说未找到模块.所以我安装了Anaconda,除了tensorflow之外一切似乎都不错.有什么安装方法吗?

I cannot seem to run tensorflow on the normal python IDE and it says module not found. So I installed Anaconda and everything seems good except for tensorflow. Any way to install this?

推荐答案

您似乎正在python3.6环境中为python3.5安装tensorflow.我建议您为张量流创建一个单独的python环境.您可以按照以下步骤进行操作

You seem to be installing tensorflow for python3.5 on a python3.6 environment. I would suggest you to create a seperate python environment for tensorflow. You can do it as follows

conda create -n Tensorflow anaconda python=3.5

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

This will create a anaconda environment called Tensorflow and install all the anaconda packages. You can also specify any other python distribution of your choice. Be sure you download the right tensorflow distribution depending on the python version you choose.

然后按如下所示激活新创建的anaconda环境

Then activate the newly created anaconda environment as follows

source activate Tensorflow

在Windows上

activate Tensorflow

这将切换python环境.然后按照以下步骤使用pip安装Tensorflow

This will switch the python environment. Then proceed to installing Tensorflow using pip as follows

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.更多详细信息此处

If you wish to install tensorflow with GPU support, you should install CUDA toolkit and the CUDNNv5.1. More details here

这篇关于tensorflow安装与conda冲突-UnsatisfiableError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆