YC Yc.W home Systems · C++ · AI Infrastructure
Programming · Tutorial

Python Ray Offline Installation Guide

Step-by-step guide for installing Ray in air-gapped environments using pre-downloaded wheel packages, with pip configuration and verification steps.

tutorial Reported tested source Version-sensitive reviewed 2026-10-01
Explore all Programming notes →
Related topics AI & LLM
Reported environment
Python
3.12
Package Manager
pip >= 21.0
Environment
Air-gapped / offline
Environment recorded in this post; verify it against your own system before applying commands.

版本范围: 本文离线安装流程固定使用 Ray 2.40.0;下载依赖与离线安装必须使用同一精确版本。

Prerequisites

  • Python 3.12
  • pip >= 21.0

Steps

  1. Create ray offline packages folder:
    mkdir ray_offline_pkgs && cd ray_offline_pkgs
    
  2. Download all dependencies (specify Python 3.12, manylinux2014_x86_64 platform, binary-only):
    pip download --python-version 312 --platform manylinux2014_x86_64 --only-binary :all: ray[default]==2.40.0
    
    # 临时加镜像执行下载
    pip download \
    --index-url https://pypi.tuna.tsinghua.edu.cn/simple \
    --retries 10 \
    --timeout 120 \
    --python-version 312 \
    --platform manylinux2014_x86_64 \
    --only-binary :all: \
    ray[default]==2.40.0
    
  3. Offline install:
    pip install --no-index --find-links=./ray_offline_pkgs ray[default]==2.40.0
    

本文版本依据:PyPI: ray 2.40.0、pip download 和 pip install。

AI 修改声明: 本文由 LLM 协助修订,最近修改时间:2026-09-25 07:36(UTC+08:00)。修订仅统一离线下载与安装所固定的 Ray 版本。

Next Steps

After installing Ray, you can proceed to: