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
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.

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
    

Next Steps

After installing Ray, you can proceed to: