Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: DLL load failed while importing _ext: 找不到指定的程序。 #3625

Open
15660116635 opened this issue Apr 7, 2024 · 1 comment

Comments

@15660116635
Copy link

Thanks for your error report and we appreciate it a lot.

  1. I have searched related issues but cannot get the expected help.
  2. The bug has not been fixed in the latest version.

(openmmlab) D:\Desktop\openmmlab\mmsegmentation>python demo/image_demo.py demo/demo.png configs/pspnet/pspnet_r50-d8_4xb2-40k_cityscapes-512x1024.py pspnet_r50-d8_512x1024_40k_cityscapes_20200605_003338-2966598c.pth --device cuda:0 --out-file result.jpg
Traceback (most recent call last):
File "demo/image_demo.py", line 6, in
from mmseg.apis import inference_model, init_model, show_result_pyplot
File "d:\desktop\openmmlab\mmsegmentation\mmseg\apis_init_.py", line 2, in
from .inference import inference_model, init_model, show_result_pyplot
File "d:\desktop\openmmlab\mmsegmentation\mmseg\apis\inference.py", line 14, in
from mmseg.models import BaseSegmentor
File "d:\desktop\openmmlab\mmsegmentation\mmseg\models_init_.py", line 3, in
from .backbones import * # noqa: F401,F403
File "d:\desktop\openmmlab\mmsegmentation\mmseg\models\backbones_init_.py", line 2, in
from .beit import BEiT
File "d:\desktop\openmmlab\mmsegmentation\mmseg\models\backbones\beit.py", line 19, in
from ..utils import PatchEmbed
File "d:\desktop\openmmlab\mmsegmentation\mmseg\models\utils_init_.py", line 2, in
from .basic_block import BasicBlock, Bottleneck
File "d:\desktop\openmmlab\mmsegmentation\mmseg\models\utils\basic_block.py", line 10, in
from mmseg.utils import OptConfigType
File "d:\desktop\openmmlab\mmsegmentation\mmseg\utils_init_.py", line 24, in
from .mask_classification import MatchMasks, seg_data_to_instance_data
File "d:\desktop\openmmlab\mmsegmentation\mmseg\utils\mask_classification.py", line 5, in
from mmcv.ops import point_sample
File "D:\Anaconda3\envs\openmmlab\lib\site-packages\mmcv\ops_init_.py", line 3, in
from .active_rotated_filter import active_rotated_filter
File "D:\Anaconda3\envs\openmmlab\lib\site-packages\mmcv\ops\active_rotated_filter.py", line 10, in
ext_module = ext_loader.load_ext(
File "D:\Anaconda3\envs\openmmlab\lib\site-packages\mmcv\utils\ext_loader.py", line 13, in load_ext
ext = importlib.import_module('mmcv.' + name)
File "D:\Anaconda3\envs\openmmlab\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed while importing _ext: 找不到指定的程序。

@Zoulinx
Copy link
Contributor

Zoulinx commented Apr 8, 2024

It seems that mmcv may not have been installed correctly. As of today, there is still no compiled version of mmcv for PyTorch 2.2. A possible solution is to install a version of PyTorch below 2.1.2 and then reinstall following the official process for mmseg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants