tensorflow install with conda conflict - UnsatisfiableError

╄→гoц情女王★ 提交于 2019-12-11 06:15:07

问题


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 custom (64-bit)

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?


回答1:


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

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.

Then activate the newly created anaconda environment as follows

source activate Tensorflow

On windows

activate 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

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



来源:https://stackoverflow.com/questions/44240707/tensorflow-install-with-conda-conflict-unsatisfiableerror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!