Skip to content
TheChatArchiveThe Chat Archive
DeepSeekdeepseek-v3-0324· DeepSeekHugging Face LMArena Human Preference 140K

It stucked Building wheels for collected packages: torch-scatter, torch-sparse,…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Mistralmistral-medium-2505’s answer.
  1. User

    It stucked Building wheels for collected packages: torch-scatter, torch-sparse, torch-cluster, torch-spline-conv

  2. DeepSeek Assistant

    It looks like you're encountering an issue while trying to install PyTorch Geometric (PyG) or related packages (torch-scatter, torch-sparse, torch-cluster, torch-spline-conv). The error suggests that the installation is "stuck" during the wheel-building process. Here are some steps to resolve this:


    1. Check Compatibility

    Ensure that the versions of torch-scatter, torch-sparse, etc., are compatible with your:

    • PyTorch version (torch.__version__)
    • Python version
    • CUDA version (if using GPU)

    Run:

    pip list | grep torch  # or `pip show torch`
    python --version
    nvidia-smi  # if using GPU
    

    2. Install Pre-Built Wheels (Recommended)

    Instead of building from source, use pre-compiled wheels. PyG provides wheels for common configurations:

    pip install torch-scatter torch-sparse torch-cluster torch-spline-conv -f https://data.pyg.org/whl/torch-{TORCH_VERSION}+{CUDA}.html
    

    Replace:

    • {TORCH_VERSION} with your PyTorch version (e.g., 2.0.0).
    • {CUDA} with your CUDA version (e.g., cu118 for CUDA 11.8, or cpu for CPU-only).

    Example (PyTorch 2.0.0 + CUDA 11.8):

    pip install torch-scatter torch-sparse torch-cluster torch-spline-conv -f https://data.pyg.org/whl/torch-2.0.0+cu118.html
    

    3. Upgrade pip and setuptools

    Older versions of pip or setuptools may struggle with building wheels:

    pip install --upgrade pip setuptools wheel
    

    4. Install from Conda (Alternative)

    If using Conda, try:

    conda install pyg -c pyg
    

    5. Debugging Build Issues

    If you must build from source:

    • Install build dependencies:
      sudo apt-get install python3-dev  # Ubuntu/Debian
      
    • Check for error logs in the console or pip's verbose output:
      pip install torch-scatter --verbose
      

    6. Use Docker (Last Resort)

    If all else fails, use PyG's official Docker image:

    docker pull pyg/pyg
    

    Common Causes of "Stuck" Builds

    • Network issues: PyPI or GitHub may be slow/unresponsive.
    • Insufficient RAM: Building requires significant memory.
    • Incompatible versions: Mismatched PyTorch/CUDA/Python versions.

    Let me know if you need help with any of these steps!

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.