After updating to 2.4.1 import torch
is crashing with error OSError: [WinError 182] The operating system cannot run %1. Error loading "C:\ProgramData\miniconda\envs\geo\Lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.
After trial-and-error I found out that it starts crashing after installing PDAL library to the same conda environment where Pytorch is. That might be due to dependency chain pdal
→ libpdal-trajectory
→ ceres-solver
→ suitesparse
→ flang 5.0.0
(which is outdated) → openmp 5.0
(which is also outdated). openmp 5.0
replaces libiomp5md.dll
file with its older version, and, as Pytorch requires the newer version (from its intel-openmp
dependency), it crashes.
Windows 11 23H2 22631.4169
Python 3.12.6 hce54a09_1_cpython conda-forge
Conda 24.7.1 py312h2e8e312_0 conda-forge
Pytorch 2.4.1 py3.12_cuda12.4_cudnn9_0 pytorch
I don’t think that this issue could or need to be solved (cause it is more related to other libs mentioned here rather than to Pytorch), just posting it here for information reasons.
P.S. Force-reinstalling intel-openmp
solves the problem (but possibly breaks some of PDAL functions)