Installing P4Python

Important

Before installing P4Python, any previously installed versions should be uninstalled.

In this section:

Install P4Python using pip

As of P4Python 2015.1, the recommended mechanism for installing P4Python is via pip. For example:

pip install p4python

pip installs binary versions of P4Python where possible, otherwise it attempts to automatically build P4Python from source. For instruction on building P4Python from source, see the Building P4Python from Source section of the P4Python Release notes.

Note

When P4Python is built without the --apidir option, setup attempts to connect to the Perforce website to download the correct version of the P4API binary. If the P4API download is successful, it is unpacked into a temporary directory.

Linux: when P4Python is built without the --ssl option, setup.py looks at the installed OpenSSL and checks to see if it is a supported version.

P4Python 2019.1 and later: OpenSSL libraries are REQUIRED, version 1.0.2+ or version 1.1.1+. If a supported version of OpenSSL is not found, setup.py will download and install one from ftp.openssl.org.

Install P4Python from a package

  1. Configure the Perforce package repository.

    As root, follow the instructions for your OS distribution:

  2. Import the Perforce package signing key.

    Follow the instructions for your OS distribution:

    For information about how to verify the authenticity of the signing key, see: https://www.perforce.com/perforce-packages

  3. Install the P4Python package on the server hosting the Helix Server.

    Follow the instructions for your OS distribution: