mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 23:00:18 +00:00
Update install instructions
Link py2 docs to py3 docs. Fix invisible subheading. Note that pip is part of the Python install now; closes #347. Suggest avoiding eol 2.6 unless paid specifically.
This commit is contained in:
@@ -5,6 +5,9 @@ Installing Python 2 on Linux
|
||||
|
||||
.. image:: https://farm5.staticflickr.com/4268/34435688560_4cc2a7bcbb_k_d.jpg
|
||||
|
||||
.. note::
|
||||
Check out our :ref:`guide for installing Python 3 on Linux<install3-linux>`.
|
||||
|
||||
The latest versions of CentOS, Red Hat Enterprise Linux (RHEL) and Ubuntu
|
||||
**come with Python 2.7 out of the box**.
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@ Installing Python 2 on Windows
|
||||
|
||||
.. image:: https://farm5.staticflickr.com/4268/34435688560_4cc2a7bcbb_k_d.jpg
|
||||
|
||||
.. note::
|
||||
Check out our :ref:`guide for installing Python 3 on Windows<install3-windows>`.
|
||||
|
||||
First, download the `latest version <https://www.python.org/ftp/python/2.7.14/python-2.7.14.msi>`_
|
||||
of Python 2.7 from the official website. If you want to be sure you are installing a fully
|
||||
up-to-date version, click the Downloads > Windows link from the home page of the
|
||||
@@ -50,24 +53,22 @@ makes it much easier for you to use other third-party Python libraries.
|
||||
Setuptools + Pip
|
||||
----------------
|
||||
|
||||
The most crucial third-party Python software of all is Setuptools, which
|
||||
extends the packaging and installation facilities provided by the distutils in
|
||||
the standard library. Once you add Setuptools to your Python system you can
|
||||
download and install any compliant Python software product with a single
|
||||
command. It also enables you to add this network installation capability to
|
||||
your own Python software with very little work.
|
||||
The two most crucial third-party Python packages are `setuptools <https://pypi.python.org/pypi/setuptools>`_ and `pip <https://pip.pypa.io/en/stable/>`_.
|
||||
|
||||
To obtain the latest version of Setuptools for Windows, run the Python script
|
||||
available here: `ez_setup.py <https://bootstrap.pypa.io/ez_setup.py>`_
|
||||
Once installed, you can download, install and uninstall any compliant Python software
|
||||
product with a single command. It also enables you to add this network installation
|
||||
capability to your own Python software with very little work.
|
||||
|
||||
Python 2.7.9 and later (on the python2 series), and Python 3.4 and later include
|
||||
pip by default.
|
||||
|
||||
You'll now have a new command available to you: **easy_install**. It is
|
||||
considered by many to be deprecated, so we will install its replacement:
|
||||
**pip**. Pip allows for uninstallation of packages, and is actively maintained,
|
||||
unlike easy_install.
|
||||
To see if pip is installed, open a command prompt and run
|
||||
|
||||
To install pip, run the Python script available here:
|
||||
`get-pip.py <https://raw.github.com/pypa/pip/master/contrib/get-pip.py>`_
|
||||
.. code-block:: console
|
||||
|
||||
$ command -v pip
|
||||
|
||||
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.
|
||||
|
||||
|
||||
Virtual Environments
|
||||
|
||||
@@ -64,24 +64,14 @@ This will launch the Python 3 interpreter.
|
||||
Setuptools + Pip
|
||||
----------------
|
||||
|
||||
The most crucial third-party Python software of all is Setuptools, which
|
||||
extends the packaging and installation facilities provided by the distutils in
|
||||
the standard library. Once you add Setuptools to your Python system you can
|
||||
download and install any compliant Python software product with a single
|
||||
command. It also enables you to add this network installation capability to
|
||||
your own Python software with very little work.
|
||||
The two most crucial third-party Python packages are `setuptools <https://pypi.python.org/pypi/setuptools>`_ and `pip <https://pip.pypa.io/en/stable/>`_,
|
||||
which let you download, install and uninstall any compliant Python software
|
||||
product with a single command. It also enables you to add this network installation
|
||||
capability to your own Python software with very little work.
|
||||
|
||||
To obtain the latest version of Setuptools for Windows, run the Python script
|
||||
available here: `ez_setup.py <https://bootstrap.pypa.io/ez_setup.py>`_
|
||||
All supported versions of Python 3 include pip, so just make sure it's up to date::
|
||||
|
||||
|
||||
You'll now have a new command available to you: **easy_install**. It is
|
||||
considered by many to be deprecated, so we will install its replacement:
|
||||
**pip**. Pip allows for uninstallation of packages, and is actively maintained,
|
||||
unlike easy_install.
|
||||
|
||||
To install pip, run the Python script available here:
|
||||
`get-pip.py <https://raw.github.com/pypa/pip/master/contrib/get-pip.py>`_
|
||||
python -m pip install -U pip
|
||||
|
||||
|
||||
Pipenv & Virtual Environments
|
||||
|
||||
@@ -24,8 +24,8 @@ Installation Guides
|
||||
These guides go over the proper installation of :ref:`Python <which-python>`
|
||||
for development purposes, as well as setuptools, pip and virtualenv.
|
||||
|
||||
Python 3 Installation Guides
|
||||
////////////////////////////
|
||||
Python 3 Installation Guides
|
||||
////////////////////////////
|
||||
|
||||
- :ref:`Python 3 on MacOS <install3-osx>`.
|
||||
- :ref:`Python 3 on Windows <install3-windows>`.
|
||||
|
||||
@@ -58,7 +58,9 @@ It is possible to `write code that works on Python 2.6, 2.7, and Python 3
|
||||
<https://docs.python.org/3/howto/pyporting.html>`_. This
|
||||
ranges from trivial to hard depending upon the kind of software
|
||||
you are writing; if you're a beginner there are far more important things to
|
||||
worry about.
|
||||
worry about. Note that Python 2.6 is end-of-life upstream, so you shouldn't
|
||||
try to write 2.6-compatible code unless you're being paid specifically to
|
||||
do that.
|
||||
|
||||
Implementations
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
Reference in New Issue
Block a user