DeepLabCut / DeepLabCut

Official implementation of DeepLabCut: Markerless pose estimation of user-defined features with deep learning for all animals incl. humans
http://deeplabcut.org
GNU Lesser General Public License v3.0
4.71k stars 1.67k forks source link

[WinError 126] Missing PyTorch dependency `fbgemm.dll` #2704

Closed ludo67100 closed 3 months ago

ludo67100 commented 4 months ago

Is there an existing issue for this?

Bug description

Just installed DLC 3.0 with .yaml file. DLC won't start because of a missing PyTorch dependency.

Operating System

Windows 11

DeepLabCut version

DLC 3.0.0rc3

DeepLabCut mode

single animal

Device type

RTX 4070 laptop

Steps To Reproduce

  1. In DEEPLABCUT environment
  2. python -m deeplabcut

Relevant log output

(DEEPLABCUT) C:\Users\ludov\Downloads>python -m deeplabcut
Loading DLC 3.0.0rc3...
Traceback (most recent call last):
  File "C:\Users\ludov\anaconda3\envs\DEEPLABCUT\lib\runpy.py", line 187, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "C:\Users\ludov\anaconda3\envs\DEEPLABCUT\lib\runpy.py", line 146, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "C:\Users\ludov\anaconda3\envs\DEEPLABCUT\lib\runpy.py", line 110, in _get_module_details
    __import__(pkg_name)
  File "C:\Users\ludov\anaconda3\envs\DEEPLABCUT\lib\site-packages\deeplabcut\__init__.py", line 61, in <module>
    from deeplabcut.modelzoo.video_inference import video_inference_superanimal
  File "C:\Users\ludov\anaconda3\envs\DEEPLABCUT\lib\site-packages\deeplabcut\modelzoo\video_inference.py", line 23, in <module>
    from deeplabcut.pose_estimation_pytorch.modelzoo.train_from_coco import adaptation_train
  File "C:\Users\ludov\anaconda3\envs\DEEPLABCUT\lib\site-packages\deeplabcut\pose_estimation_pytorch\__init__.py", line 11, in <module>
    from deeplabcut.pose_estimation_pytorch.apis import (
  File "C:\Users\ludov\anaconda3\envs\DEEPLABCUT\lib\site-packages\deeplabcut\pose_estimation_pytorch\apis\__init__.py", line 12, in <module>
    from deeplabcut.pose_estimation_pytorch.apis.analyze_images import (
  File "C:\Users\ludov\anaconda3\envs\DEEPLABCUT\lib\site-packages\deeplabcut\pose_estimation_pytorch\apis\analyze_images.py", line 27, in <module>
    from deeplabcut.pose_estimation_pytorch.apis.utils import (
  File "C:\Users\ludov\anaconda3\envs\DEEPLABCUT\lib\site-packages\deeplabcut\pose_estimation_pytorch\apis\utils.py", line 23, in <module>
    from deeplabcut.pose_estimation_pytorch.data.dataset import PoseDatasetParameters
  File "C:\Users\ludov\anaconda3\envs\DEEPLABCUT\lib\site-packages\deeplabcut\pose_estimation_pytorch\data\__init__.py", line 11, in <module>
    from deeplabcut.pose_estimation_pytorch.data.base import Loader
  File "C:\Users\ludov\anaconda3\envs\DEEPLABCUT\lib\site-packages\deeplabcut\pose_estimation_pytorch\data\base.py", line 20, in <module>
    from deeplabcut.pose_estimation_pytorch.data.dataset import (
  File "C:\Users\ludov\anaconda3\envs\DEEPLABCUT\lib\site-packages\deeplabcut\pose_estimation_pytorch\data\dataset.py", line 18, in <module>
    from torch.utils.data import Dataset
  File "C:\Users\ludov\anaconda3\envs\DEEPLABCUT\lib\site-packages\torch\__init__.py", line 148, in <module>
    raise err
OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\ludov\anaconda3\envs\DEEPLABCUT\lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.

Anything else?

No response

Code of Conduct

n-poulsen commented 4 months ago

Hi @ludo67100! As you said, I believe the issue is with your PyTorch installation. Have you installed CUDA on your laptop so you can use your GPU with PyTorch?

Christophedupre commented 4 months ago

I have the same issue. I have not installed CUDA as I am planning on using my CPU only for now.

HLH2000 commented 4 months ago

I have the same issue on my laptop, too. Since it runs on the CPU only, I think that PyTorch should be easier to install than the CUDA version. After checking everything and ensuring it was correct, I found an article that might help you.

https://github.com/pytorch/pytorch/issues/131662#issuecomment-2253733324

Maybe the DLC team could provide some notifications for Windows users in the future.

ludo67100 commented 3 months ago

@n-poulsen I have CUDA installed:

C:\Users\ludov>nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2024 NVIDIA Corporation Built on Fri_Jun_14_16:44:19_Pacific_Daylight_Time_2024 Cuda compilation tools, release 12.6, V12.6.20 Build cuda_12.6.r12.6/compiler.34431801_0

  1. Looks like @HLH2000 's suggestion is correct: I've installed the Desktop dev with C++ dependency through Visual Studio. Now DLC launches properly!