CAPTAIN-WHU / DOTA_devkit

635 stars 184 forks source link

import _polyiou ModuleNotFoundError: No module named '_polyiou' #37

Open 113HQ opened 4 years ago

113HQ commented 4 years ago

运行ResultMerge.py的时候报错 import _polyiou ModuleNotFoundError: No module named '_polyiou' 而安装前面东西的时候也有报错 2020-08-09 175636

ashnair1 commented 4 years ago

This happens if you didn't build the polyiou extension correctly. You need to build the polyiou extension using

swig -c++ -python polyiou.i
python setup.py build_ext --inplace

Once you do this, you should have the polyiou .so file which has a name like this : _polyiou.cpython-36m-x86_64-linux-gnu.so. In my case I compiled, with python 3.6 on a Linux system.

sippinlala commented 3 years ago

已经有_polyiou.cpython-36m-x86_64-linux-gnu.so这个文件了,但还是报ModuleNotFoundError: No module named '_polyiou'这个错

Tomandjob commented 3 years ago

I had that problem too.

ashnair1 commented 3 years ago

If you like, you can try out my fork of this project: https://github.com/ashnair1/dotadevkit

I've restructured it as a CLI and the polyiou extension has been prebuilt. So you only have to run pip install dotadevkit and follow the instructions here to use it.

zxcvbml commented 3 years ago

已经有_polyiou.cpython-36m-x86_64-linux-gnu.so这个文件了,但还是报ModuleNotFoundError: No module named '_polyiou'这个错

请问这个文件路径在哪里呢?我不确定我是否已经有这个文件。没有看到。谢谢!

zxcvbml commented 3 years ago

问题已经解决,就是直接换了一个dotadevkit

s-s-wang commented 3 years ago

问题已经解决,就是直接换了一个dotadevkit

请问换成新的dotadevkit后,需要把它的名字改成DOTA_devkit吗,在执行训练命令时,报错No module named 'datasets.dotadevkit.ResultMerge_multi_process'.

lab-gpu commented 3 years ago

This may be the problem of imp module which is in polyiou.py.Imp module is deprecated and it is replaced with importlib.The official code use imp to load the _polyiou.cpython-36m-x86_64-linux-gnu.so but the module is deprecated.Details can refer to:https://blog.csdn.net/qq_34575070/article/details/111554750 Hope may useful

113HQ commented 3 years ago

This happens if you didn't build the polyiou extension correctly. You need to build the polyiou extension using

swig -c++ -python polyiou.i
python setup.py build_ext --inplace

Once you do this, you should have the polyiou .so file which has a name like this : _polyiou.cpython-36m-x86_64-linux-gnu.so. In my case I compiled, with python 3.6 on a Linux system.

我是在Windows下装的,import的时候是报错ImportError: DLL load failed,怎么办

dineshdaultani commented 3 years ago

This may be the problem of imp module which is in polyiou.py.Imp module is deprecated and it is replaced with importlib.The official code use imp to load the _polyiou.cpython-36m-x86_64-linux-gnu.so but the module is deprecated.Details can refer to:https://blog.csdn.net/qq_34575070/article/details/111554750 Hope may useful

Based on the response from @lab-gpu , I was able to fix the issue. Please refer to my answer here on how to fix this issue: https://github.com/yijingru/BBAVectors-Oriented-Object-Detection/issues/31#issuecomment-817886892

DrRyanHuang commented 2 years ago

@lab-gpu

This may be the problem of imp module which is in polyiou.py.Imp module is deprecated and it is replaced with importlib.The official code use imp to load the _polyiou.cpython-36m-x86_64-linux-gnu.so but the module is deprecated.Details can refer to:https://blog.csdn.net/qq_34575070/article/details/111554750 Hope may useful

Thx for your blog! It is very cool!!