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

cannot import name 'nms_cpu' from partially initialized module 'movienet.tools.detector.persondet.modules.core.ops.nms' (most likely due to a circular import) #33

Open
1933874502 opened this issue Jul 13, 2022 · 2 comments

Comments

@1933874502
Copy link

need a solution

@yenvu93
Copy link

yenvu93 commented Aug 13, 2022

Using git clone https://github.com/movienet/movienet-tools.git
and run python setup.py develop
The problem will be solved. It seems that due to not being able to get git, it doesn't build the nms_cpu object which is a c++ file before importing it into the python file.

@1933874502
Copy link
Author

Thanks for answering.I did what you said,but this came out. what is the reason?

EXT_TYPE pytorch
EXT_MODULE_LIST [<setuptools.extension.Extension('movienet.tools.detector.persondet.modules.core.ops.nms.soft_nms_cpu') at 0x257c4206ec0>, <setuptools.extension.Extension('movienet.tools.detector.persondet.modules.core.ops.nms.nms_cpu') at 0x257c40fe770>, <setuptools.extension.Extension('movienet.tools.detector.persondet.modules.core.ops.nms.nms_cuda') at 0x257c40fe6b0>, <setuptools.extension.Extension('movienet.tools.detector.persondet.modules.core.ops.roi_align.roi_align_cuda') at 0x257c4207460>, <setuptools.extension.Extension('movienet.tools.detector.persondet.modules.core.ops.roi_pool.roi_pool_cuda') at 0x257c42070a0>, <setuptools.extension.Extension('movienet.tools.action_extractor.core.ops.nms.soft_nms_cpu') at 0x257bd34feb0>, <setuptools.extension.Extension('movienet.tools.action_extractor.core.ops.nms.nms_cpu') at 0x257c40fe6e0>, <setuptools.extension.Extension('movienet.tools.action_extractor.core.ops.nms.nms_cuda') at 0x257bd34f340>, <setuptools.extension.Extension('movienet.tools.action_extractor.core.ops.roi_align.roi_align_cuda') at 0x257bd34fc10>, <setuptools.extension.Extension('movienet.tools.action_extractor.core.ops.roi_pool.roi_pool_cuda') at 0x257bd34fb80>]
WARNING: The wheel package is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))': /simple/pytest-runner/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))': /simple/pytest-runner/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))': /simple/pytest-runner/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))': /simple/pytest-runner/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))': /simple/pytest-runner/
ERROR: Could not find a version that satisfies the requirement pytest-runner (from versions: none)
ERROR: No matching distribution found for pytest-runner
Traceback (most recent call last):
File "D:\python\lib\site-packages\setuptools\installer.py", line 75, in fetch_build_egg
subprocess.check_call(cmd)
File "D:\python\lib\subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['D:\python\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\Users\lyh\AppData\Local\Temp\tmp4a5b7d_1', '--quiet', 'pytest-runner']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\github\movienet-tools\setup.py", line 192, in
setup(
File "D:\python\lib\site-packages\setuptools_init_.py", line 152, in setup
install_setup_requires(attrs)
File "D:\python\lib\site-packages\setuptools_init
.py", line 147, in install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "D:\python\lib\site-packages\setuptools\dist.py", line 806, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "D:\python\lib\site-packages\pkg_resources_init
.py", line 766, in resolve
dist = best[req.key] = env.best_match(
File "D:\python\lib\site-packages\pkg_resources_init_.py", line 1051, in best_match
return self.obtain(req, installer)
File "D:\python\lib\site-packages\pkg_resources_init_.py", line 1063, in obtain
return installer(requirement)
File "D:\python\lib\site-packages\setuptools\dist.py", line 877, in fetch_build_egg
return fetch_build_egg(self, req)
File "D:\python\lib\site-packages\setuptools\installer.py", line 77, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['D:\python\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\Users\lyh\AppData\Local\Temp\tmp4a5b7d_1', '--quiet', 'pytest-runner']' returned non-zero exit status 1.

Using git clone https://github.com/movienet/movienet-tools.git and run python setup.py develop The problem will be solved. It seems that due to not being able to get git, it doesn't build the nms_cpu object which is a c++ file before importing it into the python file.

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