Redigera

Dela via


Install the Image Analysis SDK

Reference documentation | Package (NuGet) | Samples

This guide shows how to install the Image Analysis SDK for C#.

Platform requirements

The Image Analysis SDK for C# is compatible with Windows, Linux, and macOS.

  • .NET installed. This installation also includes the .NET CLI.

Install the Image Analysis SDK for C#

The Image Analysis SDK for C# is available as a NuGet package and implements .NET Standard 2.0. For more information, see Azure.AI.Vision.ImageAnalysis.

The Image Analysis SDK for C# can be installed from the .NET CLI. To add a package reference in your project file, run this command in the folder where your .csproj file is located:

dotnet add package  Azure.AI.Vision.ImageAnalysis --prerelease

Reference documentation | Package (PyPi) | Samples

This guide shows how to install the Image Analysis SDK for Python.

Platform requirements

The Image Analysis SDK for Python is compatible with Windows, Linux, and macOS.

Install the Image Analysis SDK for Python

Before you install the Image Analysis SDK for Python, make sure to satisfy the platform requirements.

Choose your tool or IDE

Install from terminal

To install the Image Analysis SDK for Python, run this command in a terminal.

pip install azure-ai-vision-imageanalysis

Upgrade to the latest Image Analysis SDK

To upgrade to the latest Image Analysis SDK, run this command in a terminal:

pip install --upgrade azure-ai-vision-imageanalysis

You can check which Image Analysis SDK for Python version is currently installed by running this command in a terminal:

pip list

Reference documentation | Maven Package | Samples

This guide shows how to install the Image Analysis SDK for Java.

Platform requirements

The Image Analysis SDK for Java is compatible with Windows, Linux, and macOS.

On Windows, you must use the 64-bit target architecture. Windows 10 or later is required.

The Java SDK uses native binaries. You must install the Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017, 2019, and 2022 for your platform. Installing this package for the first time might require a restart.

JAVA Development Kit

Java 8 or above is required.

Install a Java Development Kit (JDK) such as Azul Zulu OpenJDK, Microsoft Build of OpenJDK, Oracle Java, or your preferred JDK.

Run java -version from a command line to confirm successful installation and see the version. Make sure that the Java installation is native to the system architecture and not running through emulation.

Install the Image Analysis SDK for Java

The Image Analysis SDK for Java is available as a Maven package. For more information, see the package azure-ai-vision-imageanalysis in the Maven repository.

Follow these steps to install the Image Analysis SDK for Java using Apache Maven:

  1. Install Apache Maven. On Linux, install from the distribution repositories if available.

  2. Open a command prompt and run mvn -v to confirm successful installation.

  3. Open a command prompt where you want to place the new project, and create a new pom.xml file.

  4. Copy the following XML content into your pom.xml file:

    <project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>azure.ai.vision.imageanalysis.samples</groupId>
      <artifactId>image-analysis-quickstart</artifactId>
      <version>0.0</version>
      <dependencies>
        <dependency>
          <groupId>com.azure</groupId>
          <artifactId>azure-ai-vision-imageanalysis</artifactId>
          <version>1.0.0-beta.1</version>
        </dependency>
        <dependency>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-nop</artifactId>
          <version>1.7.36</version> 
        </dependency>
      </dependencies>
    </project>
    
  5. Update the version value in <version>1.0.0-beta.1</version> based on the latest version you find in the Maven repository for the azure-ai-vision-imageanalysis package.

  6. Run the following Maven command to install the Image Analysis SDK and dependencies.

    mvn clean dependency:copy-dependencies
    
  7. Verify that the local folder path target\dependency was created, and it contains .jar files including three file named azure-ai-vision-*.jar

Reference documentation | Package (npm) | Samples

This guide shows how to install the Image Analysis SDK for JavaScript.

Platform requirements

The Image Analysis SDK for JavaScript is compatible with Windows, Linux, and macOS.

Install the Image Analysis SDK for JavaScript

Install the Image Analysis client library for JavaScript with npm:

npm install @azure-rest/ai-vision-image-analysis

Next steps

Follow the Image Analysis quickstart to get started.