Raspberry Pi: Set Up

So I went to setup the Raspberry Pi today. It’s actually quite a lot of work, since I also want to install Python3.7 and enable ssh and all sort of things. Also the Pi’s GUI doesn’t support connecting to an WPA-Enterprise authenticated network, so I had to find a way to work around that.

After a fresh Raspbian install, I needed to change a few files for it to connect to the WiFi. Because this happens before any connection was available, I had to type all contents by hand.

nano /etc/wpa_supplicant/wpa_supplicant.conf

Then add this to the bottom

     pairwise=CCMP TKIP
     group=CCMP TKIP
     identity="Someone's Choate Username"
     password="Someone's Choate Password"

Then edit the network interface file:

nano /etc/network/interface

Add the following content

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp pre-up wpa_supplicant -B -Dwext -i wlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf post-down killall -q wpa_supplicant

And finally:

sudo reboot

Solution adopted from here .

After reboot, open settings and enable SSH access. Find out the IP address by

ifconfig wlan0

The thing comes after inet is the IP address. I could then SSH into the Pi and add my public key to ~/.ssh/authorized_keys, under root account obviously.

I then downloaded and compiled a copy of Python3.7, which took a few hours to complete

sudo su -
apt-get update -y
apt-get install 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 -y
wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz
tar xf Python-3.7.3.tar.xz
cd Python-3.7.3
./configure --enable-optimizations
make -j4
make altinstall

Obviously, compiling Python isn’t the most fun thing to do, but I had to do this several times already because there are a few features I like about Python3.7, such as annotations and asyncio.

Also, I advice against touching the Pi when it’s compiling/testing python. It can get to 80 ºC or higher.