Skip to content

OSError: [WinError 127] 找不到指定的程序。 #221

Closed

Description

@aoyue241

hi ,i am here .
I'm attempting to run the MatterGen model on my **Windows (CPU-only) computer to generate materials. However, I encountered persistent errors when installing and loading three critical dependencies: torch-scatter,*torch-cluster, and *torch-sparse (required by torch-geometric, which is essential for MatterGen).

Issue Description:
When trying to import these three libraries (e.g., import torch_scatter), the following error consistently occurs:

OSError: [WinError 127] The specified procedure could not be found.  
OSError: Could not load this library: [path_to_venv]\Lib\site-packages\torch_scatter\_version_cpu.pyd

Troubleshooting Steps Already Attempted

  1. Official Source Installation: Tried installing the libraries via their official PyTorch Geometric wheel links, matching the PyTorch version (initially 2.7.0, later downgraded to 2.3.0 for better compatibility) and my Python 3.10 (64-bit) environment.
    $ pip list | grep torch
    torch 2.7.0+cpu
    torch_cluster 1.6.3+pt27cpu
    torch-geometric 2.7.0
    torch_scatter 2.1.2+pt27cpu
    torch_sparse 0.6.18+pt27cpu
    torchaudio 2.7.0+cpu

  2. Visual Studio Installation: Installed Visual Studio 2022 Build Tools with the "Desktop Development with C++" workload to ensure the MSVC compiler and C++ runtime libraries are available.

  3. Manual DLL Copy: Located the required C++ runtime DLLs (msvcp140.dll, vcruntime140.dll, vcruntime140_1.dll) from the Visual Studio redistributable directory and copied them directly into the installation folders of torch-scatter, torch-cluster, and torch-sparse.

Request

i want to ask:

  1. What other potential causes could lead to this "failed to load .pyd library" issue on a Windows CPU environment?
  2. Are there any additional troubleshooting steps or alternative solutions to get these dependencies working properly for running MatterGen?

thank you very much

Activity

  1. danielzuegner commented on Nov 10, 2025

    @danielzuegner
    Contributor

    Dear aoyue241,

    Thanks for opening this issue. So far we have not optimized the virtual environment for Windows systems; we assume Linux OS for our installation steps. I will see what I can do to adjust the pyproject.toml to enable a Windows installation. Stay tuned!

  2. linked a pull request that will close this issueadd windows option #225on Nov 10, 2025
  3. danielzuegner commented on Nov 10, 2025

    @danielzuegner
    Contributor

    Hi aoyue241,

    can you check out this branch and see if it works for you? #225

    Best,

    Daniel

  4. danielzuegner commented on Jan 5, 2026

    @danielzuegner
    Contributor

    Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions