Download and install Python: (check on Add Python on the path)
https://www.python.org/ftp/python/3.6.2 ... -amd64.exe
Run this from a terminal Window (cmd):
pip3 install --upgrade tensorflow
To test it:
c:\>python
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> hello = tf.constant( "Hello world" )
>>> session = tf.Session()
>>> print( session.run( hello ) )
b'Hello world'
Testing TensorFlow with Python on Windows
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Testing TensorFlow with Python on Windows
Running a python file:
hello.py
Open a Windows console window (cmd) and type:
python hello.py
hello.py
Code: Select all
print( "Hello world" )
python hello.py
c:\>python hello.py
Hello world
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Testing TensorFlow with Python on Windows
Running tensorflow from a python file:
tf.py
from a cmd window execute:
python tf.py
b'Hello world'
tf.py
Code: Select all
import tensorflow as tf
hello = tf.constant( "Hello world" )
session = tf.Session()
print( session.run( hello ) )
python tf.py
b'Hello world'