- Recording raw data
- Compiling raw data collected - Modular
- Learn from raw data
- Main Code for Live Recognition
- GitKraken 3.2.2
- Anaconda 5.0.1
- Update:
conda update --all
conda install -c anaconda pyserial
- Update:
- RealVNC Viwer
- Get the
Standalone EXE x64
if you do not wish to install
- Get the
- Arduino IDE 1.8.5
- Noobs 2.4.4
- Update system (use Terminal)
- Fetch latest versions
sudo apt-get update
- Download and update local versions
sudo apt-get upgrade
- Install VNC Server for remote access Source
sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer
- Restart
sudo reboot
- Fetch latest versions
- Update Python and packages (Choose one)
- Python 3.6.3 (Will override terminal commands)
- Download Berryconda3-2.0.0-Linux-armv7l.sh to desktop
cd Desktop
sudo chmod +x Berryconda3-2.0.0-Linux-armv7l.sh
Source- Double click file on desktop and
Execute in Terminal
- Follow instructions
conda update --all
to update from Python 3.6.1 to Python 3.6.3 Sourceconda install -c anaconda pyserial
conda install pandas
to install numpy and pandasconda install scikit-learn
conda install pycrypto
- Python 3.5.3-1
apt-get install python3-pandas
sudo apt-get install python3-pip
Sourcepip3 install -U scikit-learn[alldeps]
pip3 install pyserial
- Python 2.7.13-2
- Install the Python basics
sudo apt-get install build-essential python-dev python-distlib python-setuptools python-pip python-wheel libzmq-dev libgdal-dev
- Install pandas dependencies
sudo apt-get install xsel xclip libxml2-dev libxslt-dev python-lxml python-h5py python-numexpr python-dateutil python-six python-tz python-bs4 python-html5lib python-openpyxl python-tables python-xlrd python-xlwt cython python-sqlalchemy python-xlsxwriter python-jinja2 python-boto python-gflags python-googleapi python-httplib2 python-zmq libspatialindex-dev
sudo pip install bottleneck rtree
- Install the scientific Python stack
sudo apt-get install python-numpy python-matplotlib python-mpltoolkits.basemap python-scipy python-sklearn python-statsmodels python-pandas
- Install other useful packages
sudo apt-get install python-requests python-pil python-scrapy python-geopy python-shapely python-pyproj
sudo pip install jupyter geopandas osmnx
- Install the Python basics
- Python 3.6.3 (Will override terminal commands)
- To run Python programs
- First change directory to where program is located i.e.
cd Desktop
pi@raspberrypi:~ $ python2 Python 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170124] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> [1]+ Stopped python2 pi@raspberrypi:~ $ python3.5 Python 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170124] on linux Type "help", "copyright", "credits" or "license" for more information. >>> [2]+ Stopped python3.5 pi@raspberrypi:~ $ python3.6 Python 3.6.3 | packaged by rpi | (default, Oct 6 2017, 12:22:32) [GCC 4.9.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> [3]+ Stopped python3.6 pi@raspberrypi:~ $ python Python 3.6.3 | packaged by rpi | (default, Oct 6 2017, 12:22:32) [GCC 4.9.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>>
- Python 3.6.3
python filename.py
- or
python3 filename.py
- or
python3.6 filename.py
- Python 3.5.3-1
python3 filename.py
(if Python 3.6.3 not installed)- or
python3.5 filename.py
- Python 2.7.13-2
python filename.py
(if Python 3.6.3 not installed)- or
python2 filename.py
- or
python2.7 filename.py
- Notes:
- In
joblib.dump()
, change parameterprotocol=2
i.e.
joblib.dump(rf_model, 'model_rf.pkl', protocol=2)
- In
- First change directory to where program is located i.e.
- Check ip address
sudo ifconfig
- .BASHRC AND .BASH_ALIASES
- i.e.
alias python=/usr/local/bin/python2.7
to resetpython
to use Python 2.7 Source - Check version locations with these commands (using Python 2.7.13 as example) Source
pi@raspberrypi:~ $ python2 Python 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170124] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.executable '/usr/bin/python2' >>> sys.exec_prefix '/usr' >>> print '\n'.join(sys.path) /usr/lib/python2.7 /usr/lib/python2.7/plat-arm-linux-gnueabihf /usr/lib/python2.7/lib-tk /usr/lib/python2.7/lib-old /usr/lib/python2.7/lib-dynload /home/pi/.local/lib/python2.7/site-packages /usr/local/lib/python2.7/dist-packages /usr/lib/python2.7/dist-packages /usr/lib/python2.7/dist-packages/PILcompat /usr/lib/python2.7/dist-packages/gtk-2.0 >>>
- i.e.
- Command to list history of apt-get Source
grep " install " /var/log/apt/history.log
- List the installed system packages and installed Python packages and dump them to files, just for reference
dpkg -l > ~/Desktop/packages.list
pip freeze > ~/Desktop/pip-freeze-initial.list
- [Python-Dev] Benchmarks: Comparison between Python 2.7 and Python 3.6 performance
- Old Google docs