This document explains how to install the CPU-only version of TakuNet's dependencies.
requirements_cpu.txt- CPU-compatible requirements fileinstall_cpu_requirements.py- Python script for installing dependenciesinstall_cpu_requirements.bat- Windows batch script for easy execution
This method uses optimized installation options and handles timeouts for large packages:
# For Windows:
install_cpu_requirements.bat
# For Linux/Mac:
python install_cpu_requirements.pyThe script performs the following steps:
- Installs PyTorch CPU packages first with an extended timeout
- Installs all remaining dependencies
- Uses
--no-cache-dirto ensure fresh packages are downloaded
If you encounter download timeouts, you can install PyTorch separately:
# Step 1: Install PyTorch CPU packages manually
pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cpu --timeout 180
# Step 2: Install all other requirements
pip install --no-cache-dir --upgrade-strategy only-if-needed -r src/requirements/requirements_cpu.txtIf you prefer using Conda:
# Create a new conda environment
conda create -n TakuNet python=3.10 -y
conda activate TakuNet
# Install CPU-only PyTorch with extended timeout
pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cpu --timeout 180
# Install remaining requirements
pip install --no-cache-dir --upgrade-strategy only-if-needed -r src/requirements/requirements_cpu.txtIf you see timeout errors like this:
HTTPSConnectionPool(...): Read timed out.
Try the following:
- Use a more stable internet connection
- Install PyTorch packages manually first with the command in Option 2
- If using a proxy, ensure it allows large downloads (PyTorch is ~200MB)
To verify CPU-only installation, run:
import torch
print(f"PyTorch version: {torch.__version__}")
print(f"CUDA available: {torch.cuda.is_available()}") # Should print False