Learning Python Network Programming

(Sean Pound) #1

Preface


[ x ]

Packages to install Python 3.4 are available for most recent distributions, we'll go
through the major ones here. If packages are not available, there are still some
options that you can use to install a working Python 3.4 environment.


Ubuntu and Debian

Ubuntu 15.04 and 14.04 come with Python 3.4 already installed; so if you're running
these versions, you're already good to go. Note that there is a bug in 14.04, which
means pip must be installed manually in any venvs created using the bundled venv
module. You can find information on working around this at http://askubuntu.
com/questions/488529/pyvenv-3-4-error-returned-non-zero-exit-status-1.


For earlier versions of Ubuntu, Felix Krull maintains a repository of up-to-date
Python installations for Ubuntu. The complete details can be found at https://
launchpad.net/~fkrull/+archive/ubuntu/deadsnakes.


On Debian, Jessie has a Python 3.4 package (python3.4), which can be installed
directly with apt-get. Wheezy has a package for 3.2 (python3.2), and Squeeze
has python3.1, which can be installed similarly. In order to get working Python
3.4 installations on these latter two, it's easiest to use Felix Krull's repositories for
Ubuntu.


RHEL, CentOS, Scientific Linux

These distributions don't provide up-to-date Python 3 packages, so we need to use a
third-party repository. For Red Hat Enterprise Linux, CentOS, and Scientific Linux,
Python 3 can be obtained from the community supported Software Collections (SCL)
repository. Instructions on using this repository can be found at https://www.
softwarecollections.org/en/scls/rhscl/python33/. At the time of writing,
Python 3.3 is the latest available version.


Python 3.4 is available from another repository, the IUS Community repository,
sponsored by Rackspace. Instructions on the installation can be found at
https://iuscommunity.org/pages/IUSClientUsageGuide.html.


Fedora

Fedora 21 and 22 provide Python 3.4 with the python3 package:


$ yum install python3


For earlier versions of Fedora, use the repositories listed in the preceding
Red Hat section.

Free download pdf