Install tensorflow on Windows with anaconda

后端 未结 7 1610
夕颜
夕颜 2021-01-11 19:50

I am trying to install Tensorflow on my Windows PC. Since I have already install and used Anaconda on Python (3.5), I have followed the instructions https://www.tensorflow.o

相关标签:
7条回答
  • 2021-01-11 20:37

    The above provided steps will install the TensorFlow in your Windows System but still you might face problem in making it available in your Jupyter notebook - hence integrating steps from different places together to have a complete solution:

    How to install Tensorflow in Anaconda environment on windows 10 1) Download and install Anaconda 3.6 (3.5 and above) in your system from Anaconda site. 2) Restart your system 3) Create virtual environment by following command: conda create -n tensorflow

    4) Activate the virtual environment

    C:> activate tensorflow

    (tensorflow)C:> # Your prompt should change TensorFlow in anaconda 5) Following steps should start installing Tensorflow in virtual environment

    (tensorflow)C:> conda install -c conda-forge tensorflow 6) Now you may enter in python and work on tensorflow (tensorflow)C:> python

    7) But if you like to work on Tensorflow on Jupyter notebook you need to setup the karnel for your virtual environment in following steps: a) Install the ipython kernel module into your virtualenv

    activate your virtualenv, if you haven't already

    pip install ipykernel

    b) Now run the kernel "self-install" script: python -m ipykernel install --user --name=my-virtualenv-name

    Replacing the --name parameter as appropriate. In my case it is tensorflow

    c) You should now be able to see your kernel in the IPython notebook menu: Kernel -> Change kernel and be able so switch to it (you may need to refresh the page before it appears in the list). IPython will remember which kernel to use for that notebook from then on.

    8) Test the tensorflow with following program you should see “Hello, TensorFlow!”

    import tensorflow as tf
    
    hello = tf.constant('Hello, TensorFlow!')
    sess = tf.Session()
    print(sess.run(hello))
    
    0 讨论(0)
  • 2021-01-11 20:39

    you can use pip to install tensorflow

    1. Install python 3.5 x64
    2. Install tensorflow using pip

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

    3. Install Visual C++ 2015 redistributable (x64 version) to be able to import tensorflow

    0 讨论(0)
  • 2021-01-11 20:39

    Tensorflow installation using Conda:

    1. Install Anaconda3-4.2.0 X64 (I ran into issue with latest release 4.3.0)
    2. Upgrade conda version 4.2.9-->4.2.11 (again, ran into some issues with conda 4.2.9)

      conda install conda=4.2.11

    3. create environment

      conda create -n tf python=3.5

    4. activate tf

    5. conda install -c conda-forge tensorflow

    0 讨论(0)
  • 2021-01-11 20:47

    UPDATE: Since TensorFlow 0.12, we have published packages for Windows. You can install the CPU-only version with the following command:

    C:\> pip install tensorflow
    

    …and the GPU-accelerated version with:

    C:\> pip install tensorflow-gpu
    

    Note that you will need the 64-bit version of Python 3.5 installed for the above commands to work.


    TensorFlow is not currently supported on Windows, and none of the official binary packages work on Windows. We are currently working on adding support for Windows, but this effort is in the early stages.

    See the answers to this question for suggestions on how to run TensorFlow using Docker or Bash for Windows.

    0 讨论(0)
  • 2021-01-11 20:49

    try installing tensorflow in conda

    open anaconda prompt and type this

    conda install tensorflow

    0 讨论(0)
  • 2021-01-11 20:52

    This worked for me (with spyder which is optional), typing in the anaconda prompt, on Windows 7:

    conda create -n tensorflow pip python=3.5
    conda activate tensorflow
    pip install --ignore-installed --upgrade tensorflow 
    conda install spyder
    spyder
    

    To exit the virtual environment:

    conda deactivate
    

    To restart the virtual environment:

    conda activate tensorflow
    spyder
    
    0 讨论(0)
提交回复
热议问题