1073741824
      ˆl–Ü4ý(&”ÔD¨ 	Å Œ¹q¦ÔÅ£Á0À¿  :   ˆl–ßi~”J_)�?q°©‹FÿÂ„_yÿa–Ü4ý(&”ÔD¨ 	Å Œ¹q§Å£Á .Õ    Installation
============

You can install ``cryptography`` with ``pip``:

.. code-block:: console

    $ pip install cryptography

If this does not work please **upgrade your pip** first, as that is the
single most common cause of installation problems.

Supported platforms
-------------------

Currently we test ``cryptography`` on Python 3.6+ and PyPy3 on these
operating systems.

* x86-64 CentOS 8.x
* x86-64 Fedora (latest)
* x86-64 macOS 10.15 Catalina
* x86-64 Ubuntu 18.04, 20.04, rolling
* AArch64 Ubuntu 20.04
* x86-64 Debian Stretch (9.x), Buster (10.x), Bullseye (11.x), Bookworm (12.x)
  and Sid (unstable)
* x86-64 Alpine (latest)
* 32-bit and 64-bit Python on 64-bit Windows Server 2019

We test compiling with ``clang`` as well as ``gcc`` and use the following
OpenSSL releases:

* ``OpenSSL 1.1.0-latest``
* ``OpenSSL 1.1.1-latest``
* ``OpenSSL 3.0-latest``

In addition we test against several versions of LibreSSL and the latest commit
in BoringSSL.


Building cryptography on Windows
--------------------------------

The wheel package on Windows is a statically linked build (as of 0.5) so all
dependencies are included. To install ``cryptography``, you will typically
just run

.. code-block:: console

    $ pip install cryptography

If you prefer to compile it yourself you'll need to have OpenSSL installed.
You can compile OpenSSL yourself as well or use `a binary distribution`_.
Be sure to download the proper version for your architecture and Python
(VC2015 is required for 3.6 and above). Wherever you place your copy of OpenSSL
you'll need to set the ``LIB`` and ``INCLUDE`` environment variables to include
the proper locations. For example:

.. code-block:: console

    C:\> \path\to\vcvarsall.bat x86_amd64
    C:\> set LIB=C:\OpenSSL-win64\lib;%LIB%
    C:\> set INCLUDE=C:\OpenSSL-win64\include;%INCLUDE%
    C:\> pip install cryptography

You will also need to have :ref:`Rust installed and
available<installation:Rust>`.

If you need to rebuild ``cryptography`` for any reason be sure to clear the
local `wheel cache`_.

.. _build-on-linux:

Building cryptography on Linux
------------------------------

.. note::

    If you are on RHEL/CentOS/Fedora/Debian/Ubuntu or another distribution
    derived from the preceding list, then you should **upgrade pip** and
    attempt to install ``cryptography`` again before following the instructions
    to compile it below. These platforms will receive a binary wheel and
    require no compiler if you have an updated ``pip``!

``cryptography`` ships ``manylinux`` wheels (as of 2.0) so all dependencies
are included. For users on **pip 19.0** or above running on a ``manylinux2010``
(or greater) compatible distribution (or **pip 21.2.4** for ``musllinux``) all
you should need to do is:

.. code-block:: console

    $ pip install cryptography

If you want to compile ``cryptography`` yourself you'll need a C compiler, a
Rust compiler, headers for Python (if you're not using ``pypy``), and headers
for the OpenSSL and ``libffi`` libraries available on your system.

On all Linux distributions you will need to have :ref:`Rust installed and
available<installation:Rust>`.

Alpine
~~~~~~

.. warning::

    The Rust available by default in Alpine < 3.12 is older than the minimum
    supported version. See the :ref:`Rust installation instructions
    <installation:Rust>` for information about installing a newer Rust.

.. code-block:: console

    $ sudo apk add gcc musl-dev python3-dev libffi-dev openssl-dev cargo

If you get an error with ``openssl-dev`` you may have to use ``libressl-dev``.

Debian/Ubuntu
~~~~~~~~~~~~~

.. warning::

    The Rust available in current Debian stable and some Ubuntu versions is
    older than the minimum supported version. Ubuntu 18.04 and 20.04 are
    sufficiently new, but otherwise please see the
    :ref:`Rust installation instructions <installation:Rust>` for information
    about installing a newer Rust.

.. code-block:: consol