简体   繁体   中英

Install tensorflow windows - python conflict

I'm trying to install tensorflow on a windows 7 machine running anaconda python 2.7.13.

C:\>python -V
Python 2.7.13 :: Anaconda 4.3.1 (64-bit)

I start by :

conda create -n tensorflow python=2.7

This prompts me to proceed, I say yes and it installs several packages without issue (all seem to point to a 2.7 version of python).

Next I use :

conda install -c conda-forge tensorflow

Which gives me this error:

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

Any suggestions how to fix this?

EDIT: I also tried this:

C:\>pip3 install --upgrade tensorflow
'pip3' is not recognized as an internal or external command,
operable program or batch file.

Next:

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

and got this error message:

tensorflow-1.1.0-cp35-cp35m-win_amd64.whl is not a supported wheel on this platf
orm.

Is there a reason you want to use Python 2.7? If you start with:

$ conda create -n tensorflow python=3.6

you should be able to install it how you are trying to, and run the latest release to boot! Otherwise, you might try installing TensorFlow r0.12.1 with pip :

$ source activate tensorflow
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.1-cp27-none-linux_x86_64.whl
$ pip install --ignore-installed --upgrade $TF_BINARY_URL

If you need GPU support, replace the export line in the above with:

$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-0.12.1-cp27-none-linux_x86_64.whl

I think since TF 1.0.1 came out, pip is the preferred installation method. If I had to guess, they changed the packages available through conda-forge and the newest version does not work with Python 2.7 (or at least that version is not available on conda-forge). I could be wrong, but this should get you there either way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM