Including the Pyca cryptography library

This page describes how to update the gcloud command-line tool with the Pyca cryptography library.

The Pyca cryptography library is a dependency for the gcloud command-line tool. Because it includes cryptographic routines, this library is not distributed with the Cloud SDK.

You need to use version v2.2 or later of this cryptography library.

Install cryptography

Installing with pip

If your system has pip, the command-line interface to the Python Package Index, run the following command.

pip install --user cryptography

Depending on your system configuration, you may need to run this command as the root user:

sudo pip install cryptography

Installing with apt-get

If your system is based on Debian, run the following command.

sudo apt-get install python-cryptography

Installing with yum

If your system is based on Redhat or CentOS, run the following command.

sudo yum install python2-cryptography

Installing on Windows

You need pip installed. Then, run the following command.

pip install cryptography

Enable site packages

Once the cryptography library is installed, you also need to enable site packages by setting the CLOUDSDK_PYTHON_SITEPACKAGES environment variable to 1. This environment variable setting tells the Cloud SDK that it should look outside of its own google-cloud-sdk/lib directory for libraries to include.







Note that enabling site packages may cause conflicts with gcloud packaged libraries, depending on what you have installed on your system. If you encounter a conflict or some of the other gcloud commands that you use stop working, you may need to unset the CLOUDSDK_PYTHON_SITEPACKAGES environment variable.

¿Te ha resultado útil esta página? Enviar comentarios:

Enviar comentarios sobre...