Skip to content

Latest commit

 

History

History
160 lines (95 loc) · 5.76 KB

azure-sdk-install.md

File metadata and controls

160 lines (95 loc) · 5.76 KB
title description ms.date ms.topic ms.custom adobe-target
How to install Azure SDK library packages for Python
How to install, uninstall, and verify Azure SDK or Python libraries using pip and conda. Includes details on installing specific versions and preview packages.
11/27/2023
conceptual
devx-track-python, py-fresh-zinc
true

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.

Be sure you've added the Microsoft channel to your conda configuration (you need to run this command only once):

conda config --add channels "Microsoft"

Then, install the desired package:

conda install <package>

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

You can use any package name listed in the Microsoft channel on anaconda.org. Azure packages have named that begin with azure-.

Packages for conda are grouped by services. For example, azure-storage includes libraries for working with blobs, file shares, queues, and any other Azure Storage service. The single azure-mgmt package contains the management libraries for all services.


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.

Be sure you've added the Microsoft channel to your conda configuration (you need to run this command only once):

conda config --add channels "Microsoft"

Then, install the desired package and version:

conda install <package>==<version>

You can find version numbers on the Microsoft channel on anaconda.org. Azure packages have names that begin with azure-. Find the library/package you want, drill into it, and look for the version number in the "Files" tab. For example, to install a version of azure-storage you can use: conda install azure-storage=2023.09.01. Or, you can specify the desired version on the command line with conda install --revision.


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.

Preview packages for conda aren't available at this time.


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.

To verify a package installation:

conda list <package>

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

You can also use conda list to see all the packages that are installed in your current conda environment.

You can use any package name listed in the Microsoft channel on anaconda.org. Azure packages have named that begin with azure-.


Uninstall a package

To uninstall a package:

pip uninstall <package>

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

To uninstall a package:

conda remove <package>

You can use any package name listed in the Microsoft channel on anaconda.org. Azure packages have named that begin with azure-.