FFGo: Difference between revisions

Jump to navigation Jump to search
4,788 bytes added ,  26 February 2016
→‎Windows: Rename “Installing” section; add sections about updating and removing the software
(→‎Using pip (generic method): Add section “When the base Python installation is updated or removed”)
(→‎Windows: Rename “Installing” section; add sections about updating and removing the software)
Line 140: Line 140:


==== Windows ====
==== Windows ====
===== Installing FFGo and its dependencies =====


Typical FFGo installation on Windows is easy, because there is no system Python shipped with Windows, therefore there is no risk of messing up your Windows installation by just installing or upgrading Python packages. The instructions below assume you have no existing Python installation on your Windows system.<ref name="SampleWindowsInstall.WhenHavingPythonAlreadyInstalled">If you do, the general principle is the same, but you'll have to make sure to invoke ''pip'' for the right Python installation, for instance with:<br/>
Typical FFGo installation on Windows is easy, because there is no system Python shipped with Windows, therefore there is no risk of messing up your Windows installation by just installing or upgrading Python packages. The instructions below assume you have no existing Python installation on your Windows system.<ref name="SampleWindowsInstall.WhenHavingPythonAlreadyInstalled">If you do, the general principle is the same, but you'll have to make sure to invoke ''pip'' for the right Python installation, for instance with:<br/>
Line 177: Line 179:


The FFGo dialog reachable via ''Help → About'' displays the versions of the main dependencies used by FFGo. In case you entered an invalid path, or some other error, a hint is generally given there. In any case, troubleshooting information is always printed to the terminal (if you ran ''ffgo.exe'' as opposed to ''ffgo-noconsole.exe'') and to the FFGo log file located in the <tt>%APPDATA%\FFGo\config</tt> folder (do a Google search with keywords “Windows” and “APPDATA” if you don't know what this means).
The FFGo dialog reachable via ''Help → About'' displays the versions of the main dependencies used by FFGo. In case you entered an invalid path, or some other error, a hint is generally given there. In any case, troubleshooting information is always printed to the terminal (if you ran ''ffgo.exe'' as opposed to ''ffgo-noconsole.exe'') and to the FFGo log file located in the <tt>%APPDATA%\FFGo\config</tt> folder (do a Google search with keywords “Windows” and “APPDATA” if you don't know what this means).
===== Updating the software =====
<p>The method for updating software installed via <tt>pip</tt> is basically
the same as on Linux. The main difference compared to the instructions given
in the Linux section is that the procedure described here uses <tt>pip</tt>
directly on your Python installation, whereas the procedure given for Linux
below uses a virtual environment. This means that instead of doing stuff
like:</p>
<pre><venv-dir>/bin/pip ...</pre>
<p>as in the Linux section, you just need to do:</p>
<pre>pip ...</pre>
<p>here (it is assumed that the <tt>pip</tt> executable is in your PATH, which
should be the case if you chose <i>Add python.exe to Path</i> in the Python
installer). Otherwise, just replace <tt>pip</tt> with its full path (something
like <tt>C:\Python<i>XY</i>\Scripts\pip.exe</tt>, where <tt><i>XY</i></tt>
corresponds to the Python version). So, here we go:</p>
<p>Open a terminal (also known as “Command Prompt”) as explained above in the
section concerning installation, and <strong>examine what we have installed with
<tt>pip</tt>:</strong></p>
<pre>C:\> pip list
CondConfigParser (1.0.2)
FFGo (1.9.0)
geographiclib (1.45)
Pillow (3.1.0)
pip (1.5.6)
setuptools (18.8)</pre>
<p>Note:</p>
<blockquote>
If the <tt>pip</tt> executable is in your PATH, it shouldn't matter in general
whether the prompt starts with <tt>C:\</tt>, <tt>C:\Windows</tt>,
<tt>C:\Users\UserName</tt> or whatever—this part, up to and including the
<tt>&gt;</tt> character, is called the <i>prompt</i>, and the actual
<i>command</i> is what you type afterwards.
</blockquote>
<p>Now, <strong>let's see what can be updated:</strong></p>
<pre>C:\> pip list --outdated
setuptools (Current: 18.8 Latest: 19.5)
pip (Current: 1.5.6 Latest: 8.0.2)</pre>
<p>Only <tt>setuptools</tt> and <tt>pip</tt> are out-of-date in this venv,
<strong>let's upgrade</strong> them:</p>
<pre>C:\> pip install --upgrade setuptools pip
Downloading/unpacking setuptools from https://pypi.python.org/packages/3.5/s/setuptools/setuptools-19.5-py2.py3-none-any.whl#md5=c44407cb10f9b231f5a05908dea1a803
  Downloading setuptools-19.5-py2.py3-none-any.whl (471kB): 471kB downloaded
Downloading/unpacking pip from https://pypi.python.org/packages/py2.py3/p/pip/pip-8.0.2-py2.py3-none-any.whl#md5=2056f553d5b593d3a970296f229c1b79
  Downloading pip-8.0.2-py2.py3-none-any.whl (1.2MB): 1.2MB downloaded
[...]
Successfully installed setuptools pip
Cleaning up...</pre>
<p>This is it. We have updated the two <tt>pip</tt>-installed packages that
were not  at their latest stable version. Of course, had FFGo been listed as
outdated too, we could have updated it this way:</p>
<pre>C:\> pip install --upgrade ffgo</pre>
<p>which, by the way, can be shortened this way if you wish:</p>
<pre>C:\> pip install -U ffgo</pre>
===== Using development snapshots, release candidates, etc.  =====
<p>The instructions given above for <tt>pip</tt>-installed Python software
only upgrade to releases labelled as “stable” by their upstream maintainers.
Sometimes, you'll want to try a beta or development release of FFGo for
instance, especially if you didn't install it from the Git repository (which
is only covered in the Linux section in order to keep things simple here).
To do this, the method is the same as previously described, except that you
have to pass <code>pip install</code> the <tt>--pre</tt> option to indicate
that you are ready to install a version that is not necessarily labelled as
“stable”. Therefore, instead of upgrading FFGo with:</p>
<pre>C:\> pip install --upgrade ffgo</pre>
you would use:
<pre>C:\> pip install --upgrade --pre ffgo</pre>
<p>Note:</p>
<blockquote>
Development snapshots have version numbers such as 1.9.0.dev2; beta versions
have numbers like 1.9.0b1; for release candidates, the version number can be
of the form 1.9.0c2 or 1.9.0rc2, etc. All this is explained in
[https://www.python.org/dev/peps/pep-0440/ PEP 0440] if you are interested.
</blockquote>
===== Uninstalling the software =====
<p>If you installed FFGo using the instructions given above, you can remove it
by simply running:</p>
<pre>C:\> pip uninstall ffgo</pre>
<p>from a Windows terminal (“Command Prompt”). This assumes you chose <i>Add
python.exe to Path</i> in the Python installer. Otherwise, just replace
<tt>pip</tt> with its full path (something like
<tt>C:\Python<i>XY</i>\Scripts\pip.exe</tt>, where <tt><i>XY</i></tt>
corresponds to the Python version).</p>
<p>This command only removes FFGo, of course. You can remove other packages
listed by the <code>pip list</code> command using the same method. And you can
also uninstall Python if you so desire, using standard methods for software
installed on Windows.</p>


==== Linux ====
==== Linux ====
417

edits

Navigation menu