nanovis / DiffFit

DiffFit: Visually-Guided Differentiable Fitting of Molecule Structures to Cryo-EM Map
Other
6 stars 0 forks source link

Install error: `fbgemm.dll` not found #37

Closed RodenLuo closed 1 week ago

RodenLuo commented 1 month ago

chimerax.core.toolshed.ToolshedError: start_tool() failed for tool DiffFit in bundle DiffFit: [WinError 126] The specified module could not be found. Error loading "C:\Users\luod\AppData\Local\UCSF\ChimeraX\1.8\Python311\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.

RodenLuo commented 2 weeks ago

This error only happened on Windows so far. One might be able to solve it with these two pages' help:

  1. https://discuss.pytorch.org/t/failed-to-import-pytorch-fbgemm-dll-or-one-of-its-dependencies-is-missing/201969
  2. https://stackoverflow.com/questions/78786306/fbgemm-load-error-trying-to-use-pytorch-on-windows

The easiest is to identify the ChimeraX installation path, open cmd from there, and type the following commands to uninstall a few packages and reinstall them with specific versions. These two commands will take quite some time (a few minutes) to finish.

For example, go to C:\Users\username\AppData\Local\ChimeraX 1.8\bin>, open cmd, and run:

python.exe -m pip uninstall torch torchvision torchaudio

python.exe -m pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu121
RodenLuo commented 2 weeks ago

The above versions are not working in some scenarios. The version below works in all cases so far.

python.exe -m pip install torch==2.2.1 --index-url https://download.pytorch.org/whl/cu121

torchvision and torchaudio are not needed.