Giter Site home page Giter Site logo

cannot import name 'nms_cpu' from partially initialized module 'movienet.tools.detector.persondet.modules.core.ops.nms' (most likely due to a circular import) about movienet-tools HOT 2 OPEN

movienet avatar movienet commented on June 6, 2024
cannot import name 'nms_cpu' from partially initialized module 'movienet.tools.detector.persondet.modules.core.ops.nms' (most likely due to a circular import)

from movienet-tools.

Comments (2)

yenvu93 avatar yenvu93 commented on June 6, 2024

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.

from movienet-tools.

1933874502 avatar 1933874502 commented on June 6, 2024

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.

from movienet-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.