Skip to content

Commit 1446c90

Browse files
committed
Update the Linux installation instructions to reflect Fedora
* Fedora does not come with Python 2 pre-installed since Fedora 23 * RHEL with Python 2.4 is no longer supported (section removed) * Added Fedora installation instructions for Python 3.6 as well * Be carefull about /usr/bin/pip
1 parent 2660764 commit 1446c90

File tree

2 files changed

+36
-9
lines changed

2 files changed

+36
-9
lines changed

docs/starting/install/linux.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,22 @@
33
Installing Python 2 on Linux
44
============================
55

6-
The latest versions of CentOS, Fedora, Redhat Enterprise (RHEL) and Ubuntu
6+
The latest versions of CentOS, Red Hat Enterprise Linux (RHEL) and Ubuntu
77
**come with Python 2.7 out of the box**.
88

99
To see which version of Python you have installed, open a command prompt and run
1010

1111
.. code-block:: console
1212
13-
$ python --version
13+
$ python2 --version
1414
15-
Some older versions of RHEL and CentOS come with Python 2.4 which is
16-
unacceptable for modern Python development. Fortunately, there are
17-
`Extra Packages for Enterprise Linux`_ which include high
18-
quality additional packages based on their Fedora counterparts. This
19-
repository contains a Python 2.6 package specifically designed to install
20-
side-by-side with the system's Python 2.4 installation.
15+
However, with the growing popularity of Python 3, some distributions, such as
16+
Fedora, don't come with Python 2 pre-installed. You can install the ``python2``
17+
package with your distribution package manager:
2118

22-
.. _Extra Packages for Enterprise Linux: http://fedoraproject.org/wiki/EPEL
19+
.. code-block:: console
20+
21+
$ sudo dnf install python2
2322
2423
You do not need to install or configure anything else to use Python. Having
2524
said that, I would strongly recommend that you install the tools and libraries

docs/starting/install3/linux.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,23 @@ If you're using another version of Ubuntu (e.g. the latest LTS release), we reco
2222
$ sudo apt-get update
2323
$ sudo apt-get install python3.6
2424

25+
If you are using other Linux distribution, chances are you already have Python 3
26+
pre-installed as well. If not, use your distribution's package manager.
27+
For example on Fedora, you would use `dnf`:
28+
29+
.. code-block:: console
30+
31+
$ sudo dnf install python3
32+
33+
Note that if the version of the ``python3`` package is not recent enough
34+
for you, there may be ways of installing more recent versions as well,
35+
depending on you distribution. For example installing the ``python36`` package
36+
on Fedora 25 to get Python 3.6. If you are a Fedora user, you might want
37+
to read about `multiple Python versions available in Fedora`_.
38+
39+
.. _multiple Python versions available in Fedora: https://developer.fedoraproject.org/tech/languages/python/multiple-pythons.html
40+
41+
2542
Working with Python 3
2643
---------------------
2744

@@ -59,6 +76,17 @@ To see if pip is installed, open a command prompt and run
5976
6077
To install pip, `follow the official pip installation guide <https://pip.pypa.io/en/latest/installing/>`_ - this will automatically install the latest version of setuptools.
6178

79+
Note that on some Linux distributions including Ubuntu and Fedora the ``pip``
80+
command is meant for Python 2, while the ``pip3`` command is meant for Python 3.
81+
82+
.. code-block:: console
83+
84+
$ command -v pip3
85+
86+
However, when using virtual environments (described bellow), you don't need to
87+
care about that.
88+
89+
6290
Virtual Environments
6391
--------------------
6492

0 commit comments

Comments
 (0)