Categories
Computers

How to install Python 3.8 on Raspberry Pi

This short guide explains how to install Python version 3.8.0 on a Raspberry Pi running Raspbian.
This post is an update to How to install Python 3.7 on Raspberry Pi

First install the dependencies needed to build

sudo apt-get update
sudo apt-get install -y build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev

Compile (takes a while!)
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
tar xf Python-3.8.0.tar.xz
cd Python-3.8.0
./configure --prefix=/usr/local/opt/python-3.8.0
make -j 4

Install
sudo make altinstall

And remove the files

cd ..
sudo rm -r Python-3.8.0
rm Python-3.8.0.tar.xz
. ~/.bashrc

Make Python 3.8 the default version, make aliases
sudo update-alternatives --config python

And verify:
python -V

Categories
Computers

How-to install Docker on a Raspberry Pi

To install Docker on a Raspberry Pi running Raspbian OS, run the following script
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

 

Categories
Computers

How to install Python 3.7 on Raspberry Pi

This short guide explains how to install Python version 3.7.0 on a Raspberry Pi running Raspbian aswell as other Debian based Linux distributions including Ubuntu.

First install the dependencies needed to build

sudo apt-get update
sudo apt-get install -y build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev

Compile (takes a while!)
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
tar xf Python-3.7.0.tar.xz
cd Python-3.7.0
./configure --prefix=/usr/local/opt/python-3.7.0
make -j 4

Install
sudo make altinstall

Make Python 3.7 the default version, make aliases
sudo ln -s /usr/local/opt/python-3.7.0/bin/pydoc3.7 /usr/bin/pydoc3.7
sudo ln -s /usr/local/opt/python-3.7.0/bin/python3.7 /usr/bin/python3.7
sudo ln -s /usr/local/opt/python-3.7.0/bin/python3.7m /usr/bin/python3.7m
sudo ln -s /usr/local/opt/python-3.7.0/bin/pyvenv-3.7 /usr/bin/pyvenv-3.7
sudo ln -s /usr/local/opt/python-3.7.0/bin/pip3.7 /usr/bin/pip3.7
alias python='/usr/bin/python3.7'
alias python3='/usr/bin/python3.7'
ls /usr/bin/python*
cd ..
sudo rm -r Python-3.7.0
rm Python-3.7.0.tar.xz
. ~/.bashrc

And verify:
python -V

And if you want to revert:
update-alternatives --config python

Categories
Computers

Raspberry Pi: full upgrade

Running the following commands on Raspbian updates all packages, the distribution and firmware. The system has to reboot twice.

Software

sudo apt-get update
sudo apt-get dist-upgrade
reboot

Firmware

sudo rpi-update
reboot

Categories
Computers

Installing HPLIP for CUPS on a Raspberry Pi

If you have a HP printer or scanner and you want to be able to use it on your Raspberryi Pi running the Raspbian operating system, you`ll have to install HP Linux Imaging and Printing and CUPS.

In the terminal run the following commands:

sudo su
apt-get update
apt-get install hplip cups
usermod -a -G lpadmin pi

In a browser, on the raspberry pi you can now access the CUPS configuration screen at http://127.0.0.1:631/

If you also would like to use your MFP/scanner also run the following commands in the terminal:

apt-get install sane
sane-find-scanner

The configuration and applications are up to you, the requirements are now installed.