417
edits
(Update for current Debian stable release) |
(apt is now preferred over apt-get for interactive use) |
||
Line 513: | Line 513: | ||
<p>This is typically done with:</p> | <p>This is typically done with:</p> | ||
<pre>apt | <pre>apt update</pre> | ||
or | or | ||
Line 531: | Line 531: | ||
<p>In other words, if you are using Debian ''bookworm'' or later, you can run:</p> | <p>In other words, if you are using Debian ''bookworm'' or later, you can run:</p> | ||
<pre>apt | <pre>apt install ffgo python3-pil.imagetk geographiclib-tools python3-geographiclib</pre> | ||
If you are using ''jessie'' without any backport of <tt>python3-geographiclib</tt>, run this instead: | If you are using ''jessie'' without any backport of <tt>python3-geographiclib</tt>, run this instead: | ||
<pre>apt | <pre>apt install ffgo python3-pil.imagetk geographiclib-tools</pre> | ||
{{Note|To avoid pulling in the entire FlightGear packages, you could tell apt | {{Note|To avoid pulling in the entire FlightGear packages, you could tell <tt>apt</tt> to not install the recommendations in the deb file:<br> | ||
<code>apt | <code>apt install --no-install-recommends ffgo python3-pil.imagetk geographiclib-tools python3-geographiclib</code><br> | ||
This is useful, if you have FG installed some other way, than by your package manager.}} | This is useful, if you have FG installed some other way, than by your package manager.}} | ||
Line 591: | Line 591: | ||
The general idea behind the [https://pip.pypa.io/ pip]-based method explained here is the following: | The general idea behind the [https://pip.pypa.io/ pip]-based method explained here is the following: | ||
<ol style="list-style-type: decimal"><li>First, you '''choose a Python interpreter''', for instance <tt>/usr/bin/python3.4</tt>, '''and create a virtual environment from this Python interpreter'''. | <ol style="list-style-type: decimal"><li>First, you '''choose a Python interpreter''', for instance <tt>/usr/bin/python3.4</tt>, '''and create a virtual environment from this Python interpreter'''. | ||
The interesting thing, with this kind of workflow, is that you never need to install packages as root, except for the base stones such as <tt>python3</tt> and <tt>python3-tk</tt><ref name="python-debian-package-names">These are package names used in Debian; other distributions may ship the same software components under slightly different names.</ref>, which are part of a standard Python installation. These can be installed normally using your usual distribution tools: <tt>apt | The interesting thing, with this kind of workflow, is that you never need to install packages as root, except for the base stones such as <tt>python3</tt> and <tt>python3-tk</tt><ref name="python-debian-package-names">These are package names used in Debian; other distributions may ship the same software components under slightly different names.</ref>, which are part of a standard Python installation. These can be installed normally using your usual distribution tools: <tt>apt</tt>, <tt>aptitude</tt> or <tt>dpkg</tt> for Debian and derivatives; <tt>yum</tt> or <tt>rpm</tt> for Redhat and derivatives, <tt>pacman</tt> for Arch Linux, etc. Therefore, using this method, there is no risk of messing up your Linux system (contrary to people coming up with crappy installation scripts and telling you to run them as root and hope for the best). A virtual environment can be created as a simple user, like this: | ||
<syntaxhighlight lang="shell" enclose="div"> | <syntaxhighlight lang="shell" enclose="div"> | ||
Line 628: | Line 628: | ||
In this section, I'll give two sample installation sessions using the [https://pip.pypa.io/ pip]-based method explained above. Both sessions start by installing the major dependencies of FFGo (Python 3 and Tkinter) with usual distribution tools. Then, the first session installs FFGo and the rest of its dependencies with pip, whereas the second session installs the rest of the dependencies with pip, but clones FFGo itself from its [https://github.com/frougon/FFGo Git repository] (this is best if you want to follow FFGo development). In this second case, it is not useful to install FFGo <i>per se</i>: it can be run directly from the Git repository clone using the [https://github.com/frougon/FFGo/blob/master/ffgo-launcher.py ffgo-launcher.py] script shipped with FFGo. | In this section, I'll give two sample installation sessions using the [https://pip.pypa.io/ pip]-based method explained above. Both sessions start by installing the major dependencies of FFGo (Python 3 and Tkinter) with usual distribution tools. Then, the first session installs FFGo and the rest of its dependencies with pip, whereas the second session installs the rest of the dependencies with pip, but clones FFGo itself from its [https://github.com/frougon/FFGo Git repository] (this is best if you want to follow FFGo development). In this second case, it is not useful to install FFGo <i>per se</i>: it can be run directly from the Git repository clone using the [https://github.com/frougon/FFGo/blob/master/ffgo-launcher.py ffgo-launcher.py] script shipped with FFGo. | ||
These sample sessions are given for Debian—at least for now—but the method is generic and can be applied to other distributions (the <tt>apt | These sample sessions are given for Debian—at least for now—but the method is generic and can be applied to other distributions (the <tt>apt</tt> commands will have to be adapted, obviously): | ||
<ol style="list-style-type: decimal"><li> | <ol style="list-style-type: decimal"><li> | ||
<p><em><strong>First session:</strong> installing FFGo (and some of its | <p><em><strong>First session:</strong> installing FFGo (and some of its | ||
Line 639: | Line 639: | ||
<p>Mandatory:</p> | <p>Mandatory:</p> | ||
<pre>apt | <pre>apt install python3 python3-tk python3-venv</pre> | ||
<p>Optional—may help if you want to compile Pillow (which is automatically | <p>Optional—may help if you want to compile Pillow (which is automatically | ||
done if you install it using pip):</p> | done if you install it using pip):</p> | ||
<pre>apt | <pre>apt install gcc libpython3-dev tcl-dev tk-dev</pre> | ||
<p>If the Pillow installation (later) fails even with this, | <p>If the Pillow installation (later) fails even with this, | ||
run the following command as root:</p> | run the following command as root:</p> | ||
<pre>apt | <pre>apt build-dep python3-pil.imagetk</pre> | ||
<p>This will install more packages, but should definitely allow you to compile | <p>This will install more packages, but should definitely allow you to compile | ||
Line 653: | Line 653: | ||
<p>Optional: to have magnetic declination, magnetic headings, etc.:</p> | <p>Optional: to have magnetic declination, magnetic headings, etc.:</p> | ||
<pre>apt | <pre>apt install geographiclib-tools | ||
# Install a minimal dataset for the MagneticField program | # Install a minimal dataset for the MagneticField program | ||
/usr/sbin/geographiclib-get-magnetic minimal</pre> | /usr/sbin/geographiclib-get-magnetic minimal</pre> |
edits