Alex Gaynor | 84d5c6b | 2014-02-02 10:12:34 -0800 | [diff] [blame] | 1 | Installation |
| 2 | ============ |
skeuomorf | bc26efb | 2014-01-29 08:31:47 +0200 | [diff] [blame] | 3 | |
| 4 | You can install ``cryptography`` with ``pip``: |
| 5 | |
| 6 | .. code-block:: console |
| 7 | |
| 8 | $ pip install cryptography |
| 9 | |
Alex Stapleton | b468417 | 2014-03-15 18:02:13 +0000 | [diff] [blame] | 10 | Supported platforms |
| 11 | ------------------- |
| 12 | |
Paul Kehrer | 4cf6e78 | 2017-10-12 06:06:01 +0800 | [diff] [blame] | 13 | Currently we test ``cryptography`` on Python 2.7, 3.4, 3.5, 3.6, and |
Paul Kehrer | 6a10b29 | 2017-05-27 19:32:26 -0500 | [diff] [blame] | 14 | PyPy 5.3+ on these operating systems. |
Alex Stapleton | b468417 | 2014-03-15 18:02:13 +0000 | [diff] [blame] | 15 | |
Paul Kehrer | 6a10b29 | 2017-05-27 19:32:26 -0500 | [diff] [blame] | 16 | * x86-64 CentOS 7.x |
| 17 | * x86-64 FreeBSD 11 |
Alex Gaynor | e685923 | 2017-09-26 20:03:53 -0400 | [diff] [blame] | 18 | * macOS 10.12 Sierra, 10.11 El Capitan |
Paul Kehrer | 6a10b29 | 2017-05-27 19:32:26 -0500 | [diff] [blame] | 19 | * x86-64 Ubuntu 14.04, 16.04, and rolling |
| 20 | * x86-64 Debian Wheezy (7.x), Jessie (8.x), Stretch (9.x), and Sid (unstable) |
Paul Kehrer | 1eeaabb | 2017-07-01 17:34:36 -0500 | [diff] [blame] | 21 | * x86-64 Alpine (latest) |
Paul Kehrer | da74298 | 2015-10-01 21:10:26 -0500 | [diff] [blame] | 22 | * 32-bit and 64-bit Python on 64-bit Windows Server 2012 |
Alex Stapleton | b468417 | 2014-03-15 18:02:13 +0000 | [diff] [blame] | 23 | |
Paul Kehrer | fb8dcdb | 2014-04-20 19:25:18 -0500 | [diff] [blame] | 24 | We test compiling with ``clang`` as well as ``gcc`` and use the following |
| 25 | OpenSSL releases: |
| 26 | |
Paul Kehrer | fb8dcdb | 2014-04-20 19:25:18 -0500 | [diff] [blame] | 27 | * ``OpenSSL 1.0.1`` |
Paul Kehrer | e683dee | 2014-08-09 08:15:23 -1000 | [diff] [blame] | 28 | * ``OpenSSL 1.0.1e-fips`` (``RHEL/CentOS 7``) |
Paul Kehrer | da74298 | 2015-10-01 21:10:26 -0500 | [diff] [blame] | 29 | * ``OpenSSL 1.0.1f`` |
Alex Gaynor | a509496 | 2017-07-03 18:00:52 -0400 | [diff] [blame] | 30 | * ``OpenSSL 1.0.1j-freebsd`` |
Paul Kehrer | da74298 | 2015-10-01 21:10:26 -0500 | [diff] [blame] | 31 | * ``OpenSSL 1.0.2-latest`` |
Alex Gaynor | 7a15827 | 2016-12-18 16:49:47 -0500 | [diff] [blame] | 32 | * ``OpenSSL 1.1.0-latest`` |
Paul Kehrer | fb8dcdb | 2014-04-20 19:25:18 -0500 | [diff] [blame] | 33 | |
Nick Badger | 63bbf18 | 2016-09-03 10:10:36 -0700 | [diff] [blame] | 34 | Building cryptography on Windows |
| 35 | -------------------------------- |
Alex Gaynor | 84d5c6b | 2014-02-02 10:12:34 -0800 | [diff] [blame] | 36 | |
Paul Kehrer | 156360a | 2014-06-30 12:14:01 -0600 | [diff] [blame] | 37 | The wheel package on Windows is a statically linked build (as of 0.5) so all |
Nick Badger | 63bbf18 | 2016-09-03 10:10:36 -0700 | [diff] [blame] | 38 | dependencies are included. To install ``cryptography``, you will typically |
| 39 | just run |
Paul Kehrer | 156360a | 2014-06-30 12:14:01 -0600 | [diff] [blame] | 40 | |
| 41 | .. code-block:: console |
| 42 | |
| 43 | $ pip install cryptography |
| 44 | |
| 45 | If you prefer to compile it yourself you'll need to have OpenSSL installed. |
Paul Kehrer | 6608b7e | 2015-07-24 21:52:17 +0100 | [diff] [blame] | 46 | You can compile OpenSSL yourself as well or use the binaries we build for our |
Paul Kehrer | 937aa47 | 2015-10-11 12:09:27 -0500 | [diff] [blame] | 47 | release infrastructure (`openssl-release`_). Be sure to download the proper |
Paul Kehrer | 4cf6e78 | 2017-10-12 06:06:01 +0800 | [diff] [blame] | 48 | version for your architecture and Python (2010 works for Python 2.7, 3.3, |
Paul Kehrer | f19fef1 | 2017-02-09 13:53:44 +0800 | [diff] [blame] | 49 | and 3.4 while 2015 is required for 3.5 and above). Wherever you place your copy |
Paul Kehrer | 6608b7e | 2015-07-24 21:52:17 +0100 | [diff] [blame] | 50 | of OpenSSL you'll need to set the ``LIB`` and ``INCLUDE`` environment variables |
| 51 | to include the proper locations. For example: |
skeuomorf | bc26efb | 2014-01-29 08:31:47 +0200 | [diff] [blame] | 52 | |
skeuomorf | b0293bf | 2014-01-29 21:41:02 +0200 | [diff] [blame] | 53 | .. code-block:: console |
| 54 | |
| 55 | C:\> \path\to\vcvarsall.bat x86_amd64 |
Paul Kehrer | 6608b7e | 2015-07-24 21:52:17 +0100 | [diff] [blame] | 56 | C:\> set LIB=C:\OpenSSL-win64\lib;%LIB% |
| 57 | C:\> set INCLUDE=C:\OpenSSL-win64\include;%INCLUDE% |
Paul Kehrer | 2a39f7f | 2014-07-02 22:56:01 -0500 | [diff] [blame] | 58 | C:\> pip install cryptography |
| 59 | |
Paul Kehrer | f19fef1 | 2017-02-09 13:53:44 +0800 | [diff] [blame] | 60 | As of OpenSSL 1.1.0 the library names have changed from ``libeay32`` and |
| 61 | ``ssleay32`` to ``libcrypto`` and ``libssl`` (matching their names on all other |
Paul Kehrer | adeaacf | 2017-05-24 12:49:18 -0700 | [diff] [blame] | 62 | platforms). ``cryptography`` links against the new 1.1.0 names by default. If |
| 63 | you need to compile ``cryptography`` against an older version then you **must** |
| 64 | set ``CRYPTOGRAPHY_WINDOWS_LINK_LEGACY_OPENSSL`` or else installation will fail. |
Paul Kehrer | f19fef1 | 2017-02-09 13:53:44 +0800 | [diff] [blame] | 65 | |
Paul Kehrer | d4ea53b | 2015-12-31 19:48:32 -0600 | [diff] [blame] | 66 | If you need to rebuild ``cryptography`` for any reason be sure to clear the |
| 67 | local `wheel cache`_. |
skeuomorf | bc26efb | 2014-01-29 08:31:47 +0200 | [diff] [blame] | 68 | |
Cory Benfield | 6d44728 | 2015-10-07 14:50:50 +0100 | [diff] [blame] | 69 | .. _build-on-linux: |
| 70 | |
Chris Glass | 2e15c7f | 2014-02-13 19:10:10 +0100 | [diff] [blame] | 71 | Building cryptography on Linux |
| 72 | ------------------------------ |
Chris Glass | 87c4edb | 2014-02-13 09:34:21 +0100 | [diff] [blame] | 73 | |
Paul Kehrer | 1eeaabb | 2017-07-01 17:34:36 -0500 | [diff] [blame] | 74 | ``cryptography`` ships a ``manylinux1`` wheel (as of 2.0) so all dependencies |
| 75 | are included. For users on pip 8.1 or above running on a ``manylinux1`` |
| 76 | compatible distribution (almost everything except Alpine) all you should |
| 77 | need to do is: |
Chris Glass | 87c4edb | 2014-02-13 09:34:21 +0100 | [diff] [blame] | 78 | |
| 79 | .. code-block:: console |
| 80 | |
Paul Kehrer | 1eeaabb | 2017-07-01 17:34:36 -0500 | [diff] [blame] | 81 | $ pip install cryptography |
Chris Glass | 87c4edb | 2014-02-13 09:34:21 +0100 | [diff] [blame] | 82 | |
Paul Kehrer | 1eeaabb | 2017-07-01 17:34:36 -0500 | [diff] [blame] | 83 | If you are on Alpine or just want to compile it yourself then |
| 84 | ``cryptography`` requires a compiler, headers for Python (if you're not |
| 85 | using ``pypy``), and headers for the OpenSSL and ``libffi`` libraries |
| 86 | available on your system. |
| 87 | |
| 88 | Alpine |
| 89 | ~~~~~~ |
| 90 | |
| 91 | Replace ``python3-dev`` with ``python-dev`` if you're using Python 2. |
| 92 | |
| 93 | .. code-block:: console |
| 94 | |
| 95 | $ sudo apk add gcc musl-dev python3-dev libffi-dev openssl-dev |
| 96 | |
| 97 | If you get an error with ``openssl-dev`` you may have to use ``libressl-dev``. |
| 98 | |
| 99 | Debian/Ubuntu |
| 100 | ~~~~~~~~~~~~~ |
| 101 | |
| 102 | Replace ``python3-dev`` with ``python-dev`` if you're using Python 2. |
| 103 | |
| 104 | .. code-block:: console |
| 105 | |
| 106 | $ sudo apt-get install build-essential libssl-dev libffi-dev python3-dev |
| 107 | |
| 108 | RHEL/CentOS |
| 109 | ~~~~~~~~~~~ |
Ayrx | a674c6b | 2014-02-15 21:24:23 +0800 | [diff] [blame] | 110 | |
| 111 | .. code-block:: console |
| 112 | |
Alex Gaynor | d58c6ad | 2017-07-14 08:04:18 -0400 | [diff] [blame] | 113 | $ sudo yum install redhat-rpm-config gcc libffi-devel python-devel \ |
| 114 | openssl-devel |
Ayrx | a674c6b | 2014-02-15 21:24:23 +0800 | [diff] [blame] | 115 | |
Paul Kehrer | 1eeaabb | 2017-07-01 17:34:36 -0500 | [diff] [blame] | 116 | |
| 117 | Building |
| 118 | ~~~~~~~~ |
| 119 | |
| 120 | You should now be able to build and install cryptography. To avoid getting |
| 121 | the pre-built wheel on ``manylinux1`` distributions you'll need to use |
| 122 | ``--no-binary``. |
Chris Glass | 87c4edb | 2014-02-13 09:34:21 +0100 | [diff] [blame] | 123 | |
| 124 | .. code-block:: console |
| 125 | |
Paul Kehrer | 1eeaabb | 2017-07-01 17:34:36 -0500 | [diff] [blame] | 126 | $ pip install cryptography --no-binary cryptography |
Chris Glass | 87c4edb | 2014-02-13 09:34:21 +0100 | [diff] [blame] | 127 | |
Alex Gaynor | eb50a2c | 2014-05-02 09:38:33 -0700 | [diff] [blame] | 128 | |
Chris Glass | 2e15c7f | 2014-02-13 19:10:10 +0100 | [diff] [blame] | 129 | Using your own OpenSSL on Linux |
| 130 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
skeuomorf | bc26efb | 2014-01-29 08:31:47 +0200 | [diff] [blame] | 131 | |
| 132 | Python links to OpenSSL for its own purposes and this can sometimes cause |
| 133 | problems when you wish to use a different version of OpenSSL with cryptography. |
| 134 | If you want to use cryptography with your own build of OpenSSL you will need to |
| 135 | make sure that the build is configured correctly so that your version of |
| 136 | OpenSSL doesn't conflict with Python's. |
| 137 | |
| 138 | The options you need to add allow the linker to identify every symbol correctly |
| 139 | even when multiple versions of the library are linked into the same program. If |
| 140 | you are using your distribution's source packages these will probably be |
| 141 | patched in for you already, otherwise you'll need to use options something like |
| 142 | this when configuring OpenSSL: |
| 143 | |
| 144 | .. code-block:: console |
| 145 | |
| 146 | $ ./config -Wl,--version-script=openssl.ld -Wl,-Bsymbolic-functions -fPIC shared |
| 147 | |
| 148 | You'll also need to generate your own ``openssl.ld`` file. For example:: |
| 149 | |
Alex Gaynor | 46c0c62 | 2017-03-22 22:56:26 -0400 | [diff] [blame] | 150 | OPENSSL_1.1.0E_CUSTOM { |
skeuomorf | bc26efb | 2014-01-29 08:31:47 +0200 | [diff] [blame] | 151 | global: |
| 152 | *; |
| 153 | }; |
| 154 | |
| 155 | You should replace the version string on the first line as appropriate for your |
| 156 | build. |
| 157 | |
Cory Benfield | 6d44728 | 2015-10-07 14:50:50 +0100 | [diff] [blame] | 158 | Static Wheels |
| 159 | ~~~~~~~~~~~~~ |
| 160 | |
Paul Kehrer | f92f2d4 | 2017-07-04 16:00:08 -0500 | [diff] [blame] | 161 | Cryptography ships statically-linked wheels for macOS, Windows, and Linux (via |
| 162 | ``manylinux1``). This allows compatible environments to use the most recent |
| 163 | OpenSSL, regardless of what is shipped by default on those platforms. Some |
| 164 | Linux distributions (most notably Alpine) are not ``manylinux1`` compatible so |
| 165 | we cannot distribute wheels for them. |
Cory Benfield | 6d44728 | 2015-10-07 14:50:50 +0100 | [diff] [blame] | 166 | |
| 167 | However, you can build your own statically-linked wheels that will work on your |
| 168 | own systems. This will allow you to continue to use relatively old Linux |
| 169 | distributions (such as LTS releases), while making sure you have the most |
| 170 | recent OpenSSL available to your Python programs. |
| 171 | |
| 172 | To do so, you should find yourself a machine that is as similar as possible to |
| 173 | your target environment (e.g. your production environment): for example, spin |
| 174 | up a new cloud server running your target Linux distribution. On this machine, |
| 175 | install the Cryptography dependencies as mentioned in :ref:`build-on-linux`. |
| 176 | Please also make sure you have `virtualenv`_ installed: this should be |
| 177 | available from your system package manager. |
| 178 | |
Cory Benfield | 8078184 | 2015-10-07 15:07:57 +0100 | [diff] [blame] | 179 | Then, paste the following into a shell script. You'll need to populate the |
| 180 | ``OPENSSL_VERSION`` variable. To do that, visit `openssl.org`_ and find the |
| 181 | latest non-FIPS release version number, then set the string appropriately. For |
Alex Gaynor | 46c0c62 | 2017-03-22 22:56:26 -0400 | [diff] [blame] | 182 | example, for OpenSSL 1.0.2k, use ``OPENSSL_VERSION="1.0.2k"``. |
Cory Benfield | 6d44728 | 2015-10-07 14:50:50 +0100 | [diff] [blame] | 183 | |
| 184 | When this shell script is complete, you'll find a collection of wheel files in |
| 185 | a directory called ``wheelhouse``. These wheels can be installed by a |
| 186 | sufficiently-recent version of ``pip``. The Cryptography wheel in this |
| 187 | directory contains a statically-linked OpenSSL binding, which ensures that you |
| 188 | have access to the most-recent OpenSSL releases without corrupting your system |
| 189 | dependencies. |
| 190 | |
| 191 | .. code-block:: console |
| 192 | |
| 193 | set -e |
| 194 | |
Cory Benfield | 8078184 | 2015-10-07 15:07:57 +0100 | [diff] [blame] | 195 | OPENSSL_VERSION="VERSIONGOESHERE" |
Cory Benfield | 6d44728 | 2015-10-07 14:50:50 +0100 | [diff] [blame] | 196 | CWD=$(pwd) |
| 197 | |
| 198 | virtualenv env |
| 199 | . env/bin/activate |
| 200 | pip install -U setuptools |
| 201 | pip install -U wheel pip |
Matt Thomas | a187c97 | 2016-10-03 17:48:31 -0400 | [diff] [blame] | 202 | curl -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz |
Cory Benfield | 6d44728 | 2015-10-07 14:50:50 +0100 | [diff] [blame] | 203 | tar xvf openssl-${OPENSSL_VERSION}.tar.gz |
| 204 | cd openssl-${OPENSSL_VERSION} |
Alex Gaynor | 46c0c62 | 2017-03-22 22:56:26 -0400 | [diff] [blame] | 205 | ./config no-shared no-ssl2 no-ssl3 -fPIC --prefix=${CWD}/openssl |
Cory Benfield | 6d44728 | 2015-10-07 14:50:50 +0100 | [diff] [blame] | 206 | make && make install |
| 207 | cd .. |
Cory Benfield | 09d1b47 | 2015-10-16 08:14:42 +0100 | [diff] [blame] | 208 | CFLAGS="-I${CWD}/openssl/include" LDFLAGS="-L${CWD}/openssl/lib" pip wheel --no-use-wheel cryptography |
Cory Benfield | 6d44728 | 2015-10-07 14:50:50 +0100 | [diff] [blame] | 209 | |
Paul Kehrer | 524e745 | 2017-03-09 19:18:24 -0400 | [diff] [blame] | 210 | Building cryptography on macOS |
| 211 | ------------------------------ |
Paul Kehrer | 451c8df | 2015-07-04 11:03:27 -0500 | [diff] [blame] | 212 | |
Paul Kehrer | a17d590 | 2016-03-20 22:29:17 -0400 | [diff] [blame] | 213 | .. note:: |
| 214 | |
| 215 | If installation gives a ``fatal error: 'openssl/aes.h' file not found`` |
| 216 | see the :doc:`FAQ </faq>` for information about how to fix this issue. |
| 217 | |
Paul Kehrer | 524e745 | 2017-03-09 19:18:24 -0400 | [diff] [blame] | 218 | The wheel package on macOS is a statically linked build (as of 1.0.1) so for |
Paul Kehrer | a17d590 | 2016-03-20 22:29:17 -0400 | [diff] [blame] | 219 | users with pip 8 or above you only need one step: |
Paul Kehrer | 451c8df | 2015-07-04 11:03:27 -0500 | [diff] [blame] | 220 | |
Paul Kehrer | 1e071ac | 2015-09-05 16:30:25 -0500 | [diff] [blame] | 221 | .. code-block:: console |
skeuomorf | bc26efb | 2014-01-29 08:31:47 +0200 | [diff] [blame] | 222 | |
Paul Kehrer | 1e071ac | 2015-09-05 16:30:25 -0500 | [diff] [blame] | 223 | $ pip install cryptography |
| 224 | |
Paul Kehrer | 524e745 | 2017-03-09 19:18:24 -0400 | [diff] [blame] | 225 | If you want to build cryptography yourself or are on an older macOS version, |
Paul Kehrer | 1e071ac | 2015-09-05 16:30:25 -0500 | [diff] [blame] | 226 | cryptography requires the presence of a C compiler, development headers, and |
Paul Kehrer | 524e745 | 2017-03-09 19:18:24 -0400 | [diff] [blame] | 227 | the proper libraries. On macOS much of this is provided by Apple's Xcode |
| 228 | development tools. To install the Xcode command line tools (on macOS 10.9+) |
Paul Kehrer | b29f464 | 2015-12-31 23:27:25 -0600 | [diff] [blame] | 229 | open a terminal window and run: |
Paul Kehrer | 1e071ac | 2015-09-05 16:30:25 -0500 | [diff] [blame] | 230 | |
| 231 | .. code-block:: console |
| 232 | |
| 233 | $ xcode-select --install |
| 234 | |
| 235 | This will install a compiler (clang) along with (most of) the required |
| 236 | development headers. |
| 237 | |
| 238 | You'll also need OpenSSL, which you can obtain from `Homebrew`_ or `MacPorts`_. |
Paul Kehrer | 355174a | 2015-12-22 09:47:26 -0600 | [diff] [blame] | 239 | Cryptography does **not** support Apple's deprecated OpenSSL distribution. |
Paul Kehrer | 1e071ac | 2015-09-05 16:30:25 -0500 | [diff] [blame] | 240 | |
| 241 | To build cryptography and dynamically link it: |
Ayrx | 1ced5b8 | 2014-04-08 19:41:26 +0800 | [diff] [blame] | 242 | |
| 243 | `Homebrew`_ |
skeuomorf | bc26efb | 2014-01-29 08:31:47 +0200 | [diff] [blame] | 244 | |
| 245 | .. code-block:: console |
| 246 | |
Paul Kehrer | 524e745 | 2017-03-09 19:18:24 -0400 | [diff] [blame] | 247 | $ brew install openssl@1.1 |
| 248 | $ env LDFLAGS="-L$(brew --prefix openssl@1.1)/lib" CFLAGS="-I$(brew --prefix openssl@1.1)/include" pip install cryptography |
skeuomorf | bc26efb | 2014-01-29 08:31:47 +0200 | [diff] [blame] | 249 | |
Paul Kehrer | 1e071ac | 2015-09-05 16:30:25 -0500 | [diff] [blame] | 250 | `MacPorts`_: |
Kimmo Parviainen-Jalanko | e01e0bf | 2014-03-19 18:57:09 +0200 | [diff] [blame] | 251 | |
| 252 | .. code-block:: console |
| 253 | |
| 254 | $ sudo port install openssl |
Paul Kehrer | 1e071ac | 2015-09-05 16:30:25 -0500 | [diff] [blame] | 255 | $ env LDFLAGS="-L/opt/local/lib" CFLAGS="-I/opt/local/include" pip install cryptography |
| 256 | |
| 257 | You can also build cryptography statically: |
| 258 | |
| 259 | `Homebrew`_ |
| 260 | |
| 261 | .. code-block:: console |
| 262 | |
Paul Kehrer | 524e745 | 2017-03-09 19:18:24 -0400 | [diff] [blame] | 263 | $ brew install openssl@1.1 |
Paul Kehrer | adeaacf | 2017-05-24 12:49:18 -0700 | [diff] [blame] | 264 | $ env CRYPTOGRAPHY_SUPPRESS_LINK_FLAGS=1 LDFLAGS="$(brew --prefix openssl@1.1)/lib/libssl.a $(brew --prefix openssl@1.1)/lib/libcrypto.a" CFLAGS="-I$(brew --prefix openssl@1.1)/include" pip install cryptography |
Paul Kehrer | 1e071ac | 2015-09-05 16:30:25 -0500 | [diff] [blame] | 265 | |
| 266 | `MacPorts`_: |
| 267 | |
| 268 | .. code-block:: console |
| 269 | |
| 270 | $ sudo port install openssl |
Paul Kehrer | adeaacf | 2017-05-24 12:49:18 -0700 | [diff] [blame] | 271 | $ env CRYPTOGRAPHY_SUPPRESS_LINK_FLAGS=1 LDFLAGS="/opt/local/lib/libssl.a /opt/local/lib/libcrypto.a" CFLAGS="-I/opt/local/include" pip install cryptography |
skeuomorf | bc26efb | 2014-01-29 08:31:47 +0200 | [diff] [blame] | 272 | |
Paul Kehrer | d4ea53b | 2015-12-31 19:48:32 -0600 | [diff] [blame] | 273 | If you need to rebuild ``cryptography`` for any reason be sure to clear the |
| 274 | local `wheel cache`_. |
| 275 | |
Alex Gaynor | eb50a2c | 2014-05-02 09:38:33 -0700 | [diff] [blame] | 276 | Building cryptography with conda |
| 277 | -------------------------------- |
| 278 | |
Alex Gaynor | e51236d | 2016-11-06 10:13:35 -0500 | [diff] [blame] | 279 | Because of a bug in conda, attempting to install cryptography out of the box |
David Reid | e162e26 | 2014-05-07 16:21:00 -0700 | [diff] [blame] | 280 | will result in an error. This can be resolved by setting the library path |
| 281 | environment variable for your platform. |
David Reid | e43861d | 2014-05-07 16:19:08 -0700 | [diff] [blame] | 282 | |
Paul Kehrer | 524e745 | 2017-03-09 19:18:24 -0400 | [diff] [blame] | 283 | On macOS: |
Alex Gaynor | d8fc257 | 2014-05-02 10:33:36 -0700 | [diff] [blame] | 284 | |
| 285 | .. code-block:: console |
| 286 | |
| 287 | $ env DYLD_LIBRARY_PATH="$HOME/anaconda/lib" pip install cryptography |
| 288 | |
David Reid | 18563e6 | 2014-05-07 16:20:09 -0700 | [diff] [blame] | 289 | and on Linux: |
David Reid | e43861d | 2014-05-07 16:19:08 -0700 | [diff] [blame] | 290 | |
| 291 | .. code-block:: console |
| 292 | |
| 293 | $ env LD_LIBRARY_PATH="$HOME/anaconda/lib" pip install cryptography |
| 294 | |
Alex Gaynor | d8fc257 | 2014-05-02 10:33:36 -0700 | [diff] [blame] | 295 | You will need to set this variable every time you start Python. For more |
Alex Gaynor | f65cba2 | 2014-05-02 10:40:57 -0700 | [diff] [blame] | 296 | information, consult `Greg Wilson's blog post`_ on the subject. |
Alex Gaynor | eb50a2c | 2014-05-02 09:38:33 -0700 | [diff] [blame] | 297 | |
| 298 | |
Alex Gaynor | 5ad6df9 | 2017-02-18 12:52:50 -0500 | [diff] [blame] | 299 | .. _`Homebrew`: https://brew.sh |
Alex Gaynor | 3197ab5 | 2015-10-02 06:33:11 -0700 | [diff] [blame] | 300 | .. _`MacPorts`: https://www.macports.org |
Paul Kehrer | 5a284e6 | 2017-05-29 17:09:23 -0500 | [diff] [blame] | 301 | .. _`openssl-release`: https://ci.cryptography.io/job/cryptography-support-jobs/job/openssl-release-1.1/ |
Alex Gaynor | 6422d83 | 2016-03-06 21:40:57 -0500 | [diff] [blame] | 302 | .. _`Greg Wilson's blog post`: https://software-carpentry.org/blog/2014/04/mr-biczo-was-right.html |
Cory Benfield | ba8f638 | 2015-10-07 15:07:47 +0100 | [diff] [blame] | 303 | .. _virtualenv: https://virtualenv.pypa.io/en/latest/ |
Alex Gaynor | 769d5c6 | 2016-11-06 04:30:36 -0500 | [diff] [blame] | 304 | .. _openssl.org: https://www.openssl.org/source/ |
Paul Kehrer | d4ea53b | 2015-12-31 19:48:32 -0600 | [diff] [blame] | 305 | .. _`wheel cache`: https://pip.pypa.io/en/stable/reference/pip_install/#caching |