Python
ONNX Runtime for Python is available on PyPI for Windows, Linux, and macOS.- CPU
- GPU (CUDA)
- Other Execution Providers
Install the CPU-only version:For nightly builds:
Requirements
- Python 3.11 or later (3.11, 3.12, 3.13, 3.14 supported)
- Compatible with Windows, Linux, and macOS
Optional Dependencies
C/C++
ONNX Runtime provides pre-built C/C++ libraries for multiple platforms.1
Download the Release Package
Download the appropriate package from GitHub Releases:
- Windows:
onnxruntime-win-x64-[version].zip - Linux:
onnxruntime-linux-x64-[version].tgz - macOS:
onnxruntime-osx-[arch]-[version].tgz - Mobile:
onnxruntime-android-[version].aar,onnxruntime-ios-[version].xcframework
include/ and lib/ directories.2
Set Up Your Build System
- CMake
- Manual Compilation
Configure your Build your project:
CMakeLists.txt:3
Include the Header
In your C++ code:
Make sure the ONNX Runtime shared library (
.so, .dll, or .dylib) is in your system’s library path at runtime.Build from Source
For advanced users who need custom builds:C#
ONNX Runtime is available as NuGet packages for .NET applications.- CPU
- GPU (CUDA)
- DirectML (Windows)
- Mobile
Install the managed and native packages:The native libraries are automatically included.
Requirements
- .NET 6.0 or later
- Compatible with .NET Framework 4.6.2+, .NET Core 3.1+, .NET 5+
- Supports Windows, Linux, macOS, iOS, and Android
Local Build
To build the NuGet managed package locally:- Windows
- Linux
Java
ONNX Runtime for Java is available on Maven Central.Maven
Add to yourpom.xml:
Gradle
Add to yourbuild.gradle:
Requirements
- Java 8 or later (Java 11+ required for building)
- Compatible with Windows, Linux, and macOS
Build from Source
To build the Java binding:JavaScript
ONNX Runtime provides packages for Node.js and web browsers.- Node.js
- Web (Browser)
- React Native
Install for Node.js applications:For development/nightly builds:
The package includes pre-built binaries for:
- Windows (x64, arm64)
- Linux (x64, arm64)
- macOS (x64, arm64)
Skip CUDA Installation
To skip automatic CUDA EP installation:Requirements
- Node.js: v20.x or later (v16+ supported)
- Electron: v28.x or later (v15+ supported)
- Browsers: Modern browsers with WebAssembly support
Platform-Specific Notes
- Windows
- Linux
- macOS
- Mobile
System Requirements
- Windows 10 version 1809 or later
- Visual Studio 2019 or later (for building from source)
- Windows SDK 10.0.17763.0 or later
GPU Support
- CUDA: NVIDIA GPU with CUDA 12.x
- DirectML: Windows 10 version 1903 or later, DirectX 12 capable GPU
Common Issues
- Install Visual C++ Redistributable if you encounter missing DLL errors