简体   繁体   中英

Installing TensorFlow in python 3.5 Anaconda distro conda env

What I did to try and solve this issue:


  1. Using Mac OS X
  2. Using Anaconda distro currently in my computer as the path /Users/hongshuhong/anaconda/
  3. Used conda instead of virtualenv because of my distribution of python. I referred to the guide here and tried to download the same with conda's package manager: https://www.tensorflow.org/versions/master/get_started/os_setup.html#download-and-setup
  4. Tensorflow worked correctly when I created an anaconda env using the command conda create --name ML python=2.7 anaconda to state I'm using 2.7 python, then used this command conda install -c https://conda.anaconda.org/jjhelmus tensorflow gathered from the Anaconda Cloud to attempt to download it. It worked when I said
$ python
>>> import tensorflow as tf
...

However, it doesn't really fix the issue:


However, I want to use the 3.5 distribution of python, simply to keep up with the times and not use outdated pythons.

  1. I attempted to download it using the same way in python=3.5, but it raised this error when I tried to run the command conda install -c https://conda.anaconda.org/jjhelmus tensorflow :
Hint: the following packages conflict with each other:
  - tensorflow
  - python 3.5*
Use 'conda info tensorflow' etc. to see the dependencies for each package.

And I ran the conda info tensorflow to see what was going on and I got:

Fetching package metadata: ....
Error: No packages found in current osx-64 channels matching: tensorflow

This is really frustrating me and I'm not sure what to do. If there's no work around for this, I think I'll have to use Anaconda's python 2.7 distribution for TensorFlow experiments. If anyone has any idea how to solve this compatibility issue(or some other kind of issue), I'd be extremely grateful. Thanks.

EDIT: I'm pretty sure TensorFlow supports 3.5 because in their documentations they say they support 2.7 python and 3.3+. If there were no clues as to whether they support 3.5, I would have already given up and used 2.7 by now.

The version of TensorFlow packaged here is version 0.5.

Python 3.x support was introduced in TensorFlow 0.6, so you need to figure out how to install the newest version into Anaconda.

Usually you can install packages into anaconda using pip , but I haven't succeeded with TensorFlow.

EDIT: I just noticed that the documentation hasn't updated the url to the pip-wheel.

To install tensorflow in python 3.5 via pip, use the following command:

$ sudo easy_install --upgrade six
$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.6.0-py3-none-any.whl

This links to ...tensorflow-0. 5 .0-py 2 -none-any.whl , which is an older version of tensorflow for python 2.x.

Tensorflow get started page link .

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