With a new SD card and Raspbian version Stretch 2018-11-13:
sudo apt install -y python3-pip python3-dev python-virtualenv
virtualenv -p python3.5 --system-site-packages myenv
source myenv/bin/activate
pip3 install --upgrade tensorflow
$ python3 Python 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tensorflow /home/pi/myenv/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: compiletime version 3.4 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.5 return f(*args, **kwds) /home/pi/myenv/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: builtins.type size changed, may indicate binary incompatibility. Expected 432, got 412 return f(*args, **kwds) >>>
Check if your Python environment is already configured (requires Python 3.4, 3.5, or 3.6):
Install these packages if necessary:
TensorFlow requirements for the Raspbian operating system:
Create a new virtual environment by choosing a Python interpreter and making a
myenv
directory to hold it:As you mentioned in your question, the python3 package version in Debian Stretch is 3.5.
Install TensorFlow (system install):
Verify the install:
Success: TensorFlow is now installed. Read the tutorials to get started.