Skip to main content

Installation

Neurenix can be installed through multiple methods depending on your environment and requirements. Choose the method that best fits your needs.

Requirements

Before installing Neurenix, ensure your system meets these requirements:
  • Python: 3.8 or higher (3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14)
  • Operating System: Linux, macOS, or Windows
  • Dependencies: NumPy ≥1.24.0, SciPy ≥1.10.0, typing-extensions ≥4.7.0
For hardware acceleration, additional dependencies may be required. See the Hardware-Specific Setup section below.

Installation Methods

1

Choose Your Installation Method

Select from pip (recommended), conda, or source installation based on your needs
2

Install Dependencies

The package manager will automatically install required dependencies
3

Verify Installation

Run a quick test to ensure Neurenix is working correctly
The easiest way to install Neurenix is via pip:
pip install neurenix
For the latest development version:
pip install git+https://github.com/MilesONerd/neurenix.git

Install with conda

If you use Anaconda or Miniconda:
conda install -c conda-forge neurenix
Or create a new environment with Neurenix:
conda create -n neurenix-env python=3.11 neurenix
conda activate neurenix-env
The conda package uses the recipe defined in conda-recipe/meta.yaml and includes all core dependencies (numpy ≥1.24.0, scipy ≥1.10.0, typing-extensions ≥4.7.0).

Install from Source

For development or to get the latest features:
# Clone the repository
git clone https://github.com/MilesONerd/neurenix.git
cd neurenix
Building from source requires:
  • setuptools ≥42
  • setuptools-rust ≥1.0.0 (for Rust extensions)
  • Rust toolchain (for the Phynexus engine)
  • C++ compiler (GCC, Clang, or MSVC)

Optional Dependencies

Install additional features with optional dependency groups:
pip install neurenix[dev]

Optional Dependency Details

Package GroupIncludesUse Case
devpytest, pytest-cov, black, isort, mypyDevelopment and testing
cudapycuda≥2022.1NVIDIA GPU acceleration
distributedray≥2.0.0Multi-node training
agentsgymnasium≥0.28.0Reinforcement learning agents
huggingfacetransformers≥4.0.0, datasets≥2.0.0Model hub integration

Hardware-Specific Setup

CUDA (NVIDIA GPUs)

For NVIDIA GPU support:
# Install CUDA support
pip install neurenix[cuda]

# Verify CUDA is available
python -c "from neurenix.binding import is_cuda_available; print(is_cuda_available())"
Requires NVIDIA drivers and CUDA toolkit (11.0 or higher) to be installed separately.

ROCm (AMD GPUs)

For AMD GPU support with ROCm:
# Install ROCm support (requires ROCm SDK)
pip install neurenix

# Verify ROCm is available
python -c "from neurenix.binding import is_rocm_available; print(is_rocm_available())"

TPU (Google Cloud)

For Google Cloud TPU support:
# TPU support is included in the base package
pip install neurenix

# Verify TPU is available
python -c "from neurenix.binding import is_tpu_available; print(is_tpu_available())"

ARM Devices

For ARM-based devices (Raspberry Pi, Jetson Nano, etc.):
# Install with ARM optimizations
pip install neurenix

# Verify ARM features
python -c "from neurenix.device import DeviceType; print('ARM supported')"
Neurenix automatically detects ARM architecture features including NEON SIMD and SVE (Scalable Vector Extensions).

WebAssembly

For browser-based execution:
# Install in Pyodide or Emscripten environment
import micropip
await micropip.install('neurenix')

Verify Installation

After installation, verify Neurenix is working correctly:
import neurenix as nx
from neurenix import Tensor, Device, DeviceType

# Print version
print(f"Neurenix version: {nx.__version__}")

# Create a simple tensor
t = Tensor([1, 2, 3, 4])
print(f"Tensor: {t.numpy()}")

# Check available devices
print(f"CPU available: True")
try:
    from neurenix.binding import is_cuda_available
    print(f"CUDA available: {is_cuda_available()}")
except (ImportError, AttributeError):
    print("CUDA available: False")

print("Installation successful!")
Expected output:
Neurenix version: 2.0.1
Tensor: [1 2 3 4]
CPU available: True
CUDA available: True/False
Installation successful!

Command-Line Interface

Neurenix includes a comprehensive CLI with multiple commands:
# View all available commands
neurenix help

# Check hardware capabilities
neurenix hardware

# Initialize a new project
neurenix init

# Train a model
neurenix run config.yaml

# Serve a model
neurenix serve model.onnx

# Export to ONNX
neurenix export model.pt --format onnx
CLI commands are registered in pyproject.toml and include: init, run, save, predict, eval, export, hardware, preprocess, monitor, optimize, dataset, serve, and help.

Troubleshooting

Import Error: No module named ‘neurenix’

Ensure you’ve activated the correct Python environment and installed the package:
pip list | grep neurenix

CUDA Not Available

If CUDA is installed but not detected:
  1. Check NVIDIA drivers: nvidia-smi
  2. Verify CUDA installation: nvcc --version
  3. Reinstall with CUDA support: pip install --force-reinstall neurenix[cuda]

Build Errors from Source

If building from source fails:
  1. Ensure Rust is installed: rustc --version
  2. Update build tools: pip install --upgrade setuptools setuptools-rust wheel
  3. Try building without Rust extensions: export NEURENIX_NO_RUST=1 && pip install -e .

Missing Optional Dependencies

If features are not working:
# Reinstall with all optional dependencies
pip install neurenix[dev,cuda,distributed,agents,huggingface]

Docker Installation

For containerized deployments:
FROM python:3.11-slim

# Install Neurenix
RUN pip install neurenix

# Your application code
COPY . /app
WORKDIR /app

CMD ["python", "train.py"]

Quickstart

Build your first model with Neurenix

API Reference

Explore the complete API documentation