Skip to content

pi setup

Josh edited this page Jul 23, 2019 · 8 revisions

Pi Setup

The following takes you through how to setup the Raspberry pi. We're assuming your Pi is connected to a wifi network and you are able to ssh into the Pi from your PC. If you have a new Pi and you need to set this up. Please checkout the Donkeycar wiki and complete up to step 9. Donkeycar Wiki

  1. Install python3.6
wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz
tar xf Python-3.6.5.tar.xz
cd Python-3.6.5
./configure
make
sudo make altinstall

# Enter...and...agree

conda config --add channels rpi
conda install python=3.6
cd ~
sudo apt-get remove python-pip python3-pip
wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py
python3 -m venv dingo
source ~/dingo/bin/activate
pip install -e.[pi]     # This can takea while because it 
                        # needs to build pandas from source
                        # It took +1h for me :-(
pip install tensorflow==1.14

#### ONLY DO THIS IF:
# This fails with an error that looks something like:
# ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the
# package versions, please update the hashes. Otherwise, examine the package contents carefully;
# someone may have tampered with them.
#    tensorflow==1.14 from https://www.piwheels.org/simple/tensorflow/tensorflow-1.14.0-cp36-none-
# linux_armv7l.whl#sha256=cba22b6d9a3e7a92c07e142bd5256c9773fd20c18090cb1d222357d3b3028655:
#        Expected sha256 cba22b6d9a3e7a92c07e142bd5256c9773fd20c18090cb1d222357d3b3028655
#             Got        834096becb11b6ce2afa66dd79016febde4d3d99a2c8e5f080dc392d6d88d4c9

# Try this using the https link (including the sha)
wget the https://...#sha256=...

ls    # To get the name of the file you just downloaded 'tensorflow-1.14.0-cp35...whl'
sha256sum tensorflow-1.14.0-cp35...whl
# Check the value is the same as the 'Expected' value in your error message
pip install tensorflow-1.14.0-cp36...whl
#############

If all else fails you can look here for Py Wheels: https://www.piwheels.org/simple/tensorflow

Clone this wiki locally