Raspberry Python3 Installation &Configuration

From FlightGear wiki
Jump to navigation Jump to search

Install Python3 and I2C submodule

Log in now as fgint user. We now need to install Python3 (language used for FG interface) and some Python3 lib to manage I2C devices

login as: fgint
fgint@192.168.0.210's password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
/usr/bin/xauth:  file /home/fgint/.Xauthority does not exist

fgint@raspberrypi:~ $  sudo apt-get install i2c-tools python3 python3-smbus
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  dh-python libmpdec2 libpython3-stdlib libpython3.4-minimal libpython3.4-stdlib python3-minimal python3.4 python3.4-minimal
Suggested packages:
  libi2c-dev python-smbus python3-doc python3-tk python3-venv python3.4-venv python3.4-doc binfmt-support
The following NEW packages will be installed:
  dh-python i2c-tools libmpdec2 libpython3-stdlib libpython3.4-minimal libpython3.4-stdlib python3 python3-minimal python3-smbus
  python3.4 python3.4-minimal
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,320 kB of archives.
After this operation, 17.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.raspberrypi.org/debian/ jessie/main i2c-tools armhf 3.1.1+svn-2 [51.3 kB]
Get:2 http://archive.raspberrypi.org/debian/ jessie/main python3-smbus armhf 3.1.1+svn-2 [9,508 B]
Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main libmpdec2 armhf 2.4.1-1 [65.8 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpython3.4-minimal armhf 3.4.2-1 [483 kB]
Get:5 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpython3-stdlib armhf 3.4.2-2 [18.1 kB]
Get:6 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpython3.4-stdlib armhf 3.4.2-1 [2,011 kB]
Get:7 http://mirrordirector.raspbian.org/raspbian/ jessie/main python3.4-minimal armhf 3.4.2-1 [1,355 kB]
Get:8 http://mirrordirector.raspbian.org/raspbian/ jessie/main python3.4 armhf 3.4.2-1 [204 kB]
Get:9 http://mirrordirector.raspbian.org/raspbian/ jessie/main python3-minimal armhf 3.4.2-2 [34.7 kB]
Get:10 http://mirrordirector.raspbian.org/raspbian/ jessie/main python3 armhf 3.4.2-2 [21.2 kB]
Get:11 http://mirrordirector.raspbian.org/raspbian/ jessie/main dh-python all 1.20141111-2 [66.4 kB]
Fetched 4,320 kB in 6s (693 kB/s)
Selecting previously unselected package libmpdec2:armhf.
(Reading database ... 31514 files and directories currently installed.)
Preparing to unpack .../libmpdec2_2.4.1-1_armhf.deb ...
Unpacking libmpdec2:armhf (2.4.1-1) ...
...
Setting up libmpdec2:armhf (2.4.1-1) ...
Setting up libpython3.4-minimal:armhf (3.4.2-1) ...
Setting up libpython3.4-stdlib:armhf (3.4.2-1) ...
Setting up python3.4-minimal (3.4.2-1) ...
Setting up python3.4 (3.4.2-1) ...
Setting up python3-minimal (3.4.2-2) ...
Setting up libpython3-stdlib:armhf (3.4.2-2) ...
Setting up i2c-tools (3.1.1+svn-2) ...
/run/udev or .udevdb or .udev presence implies active udev.  Aborting MAKEDEV invocation.
Setting up python3-smbus (3.1.1+svn-2) ...
Setting up dh-python (1.20141111-2) ...
Setting up python3 (3.4.2-2) ...
running python rtupdate hooks for python3.4...
running python post-rtupdate hooks for python3.4...
Processing triggers for libc-bin (2.19-18+deb8u9) ...
fgint@raspberrypi:~ $