InterDigitalInc / CompressAI

A PyTorch library and evaluation platform for end-to-end compression research
https://interdigitalinc.github.io/CompressAI/
BSD 3-Clause Clear License
1.21k stars 232 forks source link

ImportError: DLL load failed while importing ans: #273

Open WenBingo opened 9 months ago

WenBingo commented 9 months ago

Hello, I would like to ask you a question about the installation of compressai “Successfully installed compressai-1.2.4.dev0” . I successfully installed cmpressai, but I got the following error when importing:

import compressai Traceback (most recent call last): File "", line 1, in File "F:\compressai\compressai__init__.py", line 30, in from compressai import ( File "F:\compressai\compressai\latent_codecs__init__.py", line 38, in from .rasterscan import RasterScanLatentCodec File "F:\compressai\compressai\latent_codecs\rasterscan.py", line 38, in from compressai.ans import BufferedRansEncoder, RansDecoder ImportError: DLL load failed while importing ans: 找不到指定的程序。

fracape commented 8 months ago

Hi, this could be due to the merge of the PR on GMM using cpp torch extensions. This needed to be handled with care as the build needs to match cuda / python used to build torch. I reverted to a classical use of pybind of the ANS cpp extension as we provide compressai as a package and it's complicated to support all versions. Please pull the current master or tag 1.2.5 and re-install. Let me know if the problem persist and please provide your environment as detailed in the template issue.