How to install Azure library packages for Python

The Azure SDK for Python is composed of many individual libraries that can be installed in standard Python or conda environments.

Libraries for standard Python environments are listed in the package index.

Packages for conda environments are listed in the Microsoft channel on anaconda.org. Azure packages have names that begin with azure-.

With these Azure libraries, you can create and manage resources on Azure services (using the management libraries, whose package names begin with azure-mgmt) and connect with those resources from app code (using the client libraries, whose package names begin with just azure-).

Install the latest version of a package

pip install <package>

pip install retrieves the latest version of a package in your current Python environment.

On Linux systems, you must install a package for each user separately. Installing packages for all users with sudo pip install isn't supported.

You can use any package name listed in the package index. On the index page, look in the Name column for the functionality you need, and then find and select the PyPI link in the Package column.

Install specific package versions

Specify the desired version on the command line with pip install.

pip install <package>==<version>

You can find version numbers in the package index. On the index page, look in the Name column for the functionality you need, and then find and select the PyPI link in the Package column. For example, to install a version of the azure-storage-blob package you can use: pip install azure-storage-blob==12.19.0.

Install preview packages

To install the latest preview of a package, include the --pre flag on the command line.

pip install --pre <package>

Microsoft periodically releases preview packages that support upcoming features. Preview packages come with the caveat that the package is subject to change and must not be used in production projects.

You can use any package name listed in the package index.

Verify a package installation

To verify a package installation:

pip show <package>

If the package is installed, pip show displays version and other summary information, otherwise the command displays nothing.

You can also use pip freeze or pip list to see all the packages that are installed in your current Python environment.

You can use any package name listed in the package index.

Uninstall a package

To uninstall a package:

pip uninstall <package>

You can use any package name listed in the package index.