Installing tensorflow with anaconda in windows

前端 未结 20 2257
春和景丽
春和景丽 2020-12-08 02:15

I have installed Anaconda on Windows 64 bit. I have downloaded PyCharm for creating a project and in the terminal of PyCharm I have installed numpy, scipy

相关标签:
20条回答
  • 2020-12-08 03:09

    Google has announced support for tensorflow on Windows. Please follow instructions at https://developers.googleblog.com/2016/11/tensorflow-0-12-adds-support-for-windows.html. Please note CUDA8.0 is needed for GPU installation.

    If you have installed the 64-bit version of Python 3.5 (either from Python.org or Anaconda), you can install TensorFlow with a single command: C:> pip install tensorflow

    For GPU support, if you have CUDA 8.0 installed, you can install the following package instead: C:> pip install tensorflow-gpu

    0 讨论(0)
  • 2020-12-08 03:10

    Google has recently launched a newer version of Tesnsorflow r0.12 which include support of Windows both CPU and GPU version can now be installed using Python >=3.5.2 (only 64-bit) version.

    For CPU only version open command prompt and enter follow command

    pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.0rc0-cp35-cp35m-win_amd64.whl
    

    Follow this Tensorflow on Windows for step by step instructions.

    UPDATE

    To install current latest version please run following command:

    pip install tensorflow #CPU only
    pip install tensorflow-gpu #For GPU support
    

    UPDATE 2020

    Tensorflow 2.0 now has a single package for both CPU and GPU version, simply run

    pip install tensorflow
    

    If your're using Anaconda you can install Tensorflow GPU version and all of its dependencies (CUDA, cuDNN) by running:

    conda install -c tensorflow-gpu
    
    0 讨论(0)
  • 2020-12-08 03:10

    I found a more recent blog post in Anaconda which instructs how to install the TF easily. I used:

    conda create -n tensorflow_env tensorflow
    

    Or for the GPU version (Make sure that you have NVIDIA GPU)

    conda create -n tensorflow_gpuenv tensorflow-gpu
    

    This way you will have different environments for different TFs.

    0 讨论(0)
  • 2020-12-08 03:10
    • Install Anaconda for Python 3.5 - Can install from here for 64 bit windows

    • Then install TensorFlow from here

    (I tried previously with Anaconda for Python 3.6 but failed even after creating Conda env for Python3.5)

    Additionally if you want to run a Jupyter Notebook and use TensorFlow in it. Use following steps.

    Change to TensorFlow env:

    C: > activate tensorflow
    (tensorflow) C: > pip install jupyter notebook
    

    Once installed, you can launch Jupyter Notebook and test

    (tensorflow) C: > jupyter notebook
    
    0 讨论(0)
  • 2020-12-08 03:10

    The above steps

    conda install -c conda-forge tensorflow
    

    will work for Windows 10 as well but the Python version should be 3.5 or above. I have used it with Anaconda Python version 3.6 as the protocol buffer format it refers to available on 3.5 or above. Thanks, Sandip

    0 讨论(0)
  • 2020-12-08 03:12

    I tried many things but always faced some issue or other. Below steps with specific version only worked for me.

    1> Create virtual env

    #conda create -n tensorflow pip python=3.5
    

    2> activate env #activate tensorflow #conda info --envs

    3> Install tensorflow

    #conda install -c conda-forge tensorflow
    

    this will install tensorflow 1.10.0

    #python -m pip install --upgrade pip
    #pip install setuptools==39.1.0
    

    3> Install keras

    #pip install keras==2.2.2
    

    Testing

    (tensorflow) C:\WINDOWS\system32>python
    Python 3.5.6 |Anaconda, Inc.| (default, Aug 26 2018, 16:05:27) [MSC v.1900 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import tensorflow as tf
    >>> import keras
    Using TensorFlow backend.
    >>>
    
    0 讨论(0)
提交回复
热议问题