Skip to content

Commit 5133671

Browse files
committed
Improve documentation for Linux Installation
* Removes redundant language. * Helps user understand which version of Python & pip are installed. * Link to modern way of installing pip & setuptools Fixes realpython#589
1 parent f7e7ebf commit 5133671

1 file changed

Lines changed: 17 additions & 14 deletions

File tree

docs/starting/install/linux.rst

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ Installing Python on Linux
66
The latest versions of Ubuntu and Fedora **come with Python 2.7 out of the box**.
77

88
The latest versions of Redhat Enterprise (RHEL) and CentOS come with Python 2.6.
9+
10+
To see which version of Python you have installed, open a command prompt and run
11+
12+
.. code-block:: console
13+
14+
$ python --version
15+
916
Some older versions of RHEL and CentOS come with Python 2.4 which is
1017
unacceptable for modern Python development. Fortunately, there are
1118
`Extra Packages for Enterprise Linux`_ which include high
@@ -18,32 +25,28 @@ side-by-side with the system's Python 2.4 installation.
1825
You do not need to install or configure anything else to use Python. Having
1926
said that, I would strongly recommend that you install the tools and libraries
2027
described in the next section before you start building Python applications
21-
for real-world use. In particular, you should always install Setuptools, as
28+
for real-world use. In particular, you should always install Setuptools and pip, as
2229
it makes it much easier for you to use other third-party Python libraries.
2330

2431
Setuptools & Pip
2532
----------------
2633

27-
The most crucial third-party Python software of all is Setuptools, which
28-
extends the packaging and installation facilities provided by the distutils
29-
in the standard library. Once you add Setuptools to your Python system you can
30-
download and install any compliant Python software product with a single
31-
command. It also enables you to add this network installation capability to
32-
your own Python software with very little work.
34+
The two most crucial third-party Python packages are `setuptools <https://pypi.python.org/pypi/setuptools>`_ and `pip <https://pip.pypa.io/en/stable/>`_.
3335

34-
To obtain the latest version of Setuptools for Linux, refer to the documentation
35-
available here: `unix-setuptools <https://pypi.python.org/pypi/setuptools#unix-wget>`_
36+
Once installed, you can download, install & uninstall any compliant Python software
37+
product with a single command. It also enables you to add this network installation
38+
capability to your own Python software with very little work.
3639

37-
The new ``easy_install`` command you have available is considered by many to be
38-
deprecated, so we will install its replacement: **pip**. Pip allows for
39-
uninstallation of packages, and is actively maintained, unlike easy_install.
40+
Python 2.7.9 and later (on the python2 series), and Python 3.4 and later include
41+
pip by default.
4042

41-
To install pip, simply open a command prompt and run
43+
To see if pip is installed, open a command prompt and run
4244

4345
.. code-block:: console
4446
45-
$ easy_install pip
47+
$ pip --version
4648
49+
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.
4750

4851
Virtual Environments
4952
--------------------

0 commit comments

Comments
 (0)