Skip to content

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

@aoyue241

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

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