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
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
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))