CornerNet-Lite icon indicating copy to clipboard operation
CornerNet-Lite copied to clipboard

ModuleNotFoundError: No module named 'top_pool'

Open Hhy1024 opened this issue 5 years ago • 7 comments

hello,I compile the corner pool.It shows: ‘’‘ running install running bdist_egg running egg_info writing cpools.egg-info/PKG-INFO writing dependency_links to cpools.egg-info/dependency_links.txt writing top-level names to cpools.egg-info/top_level.txt reading manifest file 'cpools.egg-info/SOURCES.txt' writing manifest file 'cpools.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext creating build/bdist.linux-x86_64/egg copying build/lib.linux-x86_64-3.6/right_pool.cpython-36m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg copying build/lib.linux-x86_64-3.6/top_pool.cpython-36m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg copying build/lib.linux-x86_64-3.6/left_pool.cpython-36m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg copying build/lib.linux-x86_64-3.6/bottom_pool.cpython-36m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg creating stub loader for top_pool.cpython-36m-x86_64-linux-gnu.so creating stub loader for bottom_pool.cpython-36m-x86_64-linux-gnu.so creating stub loader for left_pool.cpython-36m-x86_64-linux-gnu.so creating stub loader for right_pool.cpython-36m-x86_64-linux-gnu.so byte-compiling build/bdist.linux-x86_64/egg/top_pool.py to top_pool.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/bottom_pool.py to bottom_pool.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/left_pool.py to left_pool.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/right_pool.py to right_pool.cpython-36.pyc creating build/bdist.linux-x86_64/egg/EGG-INFO copying cpools.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying cpools.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying cpools.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying cpools.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt zip_safe flag not set; analyzing archive contents... pycache.bottom_pool.cpython-36: module references file pycache.left_pool.cpython-36: module references file pycache.right_pool.cpython-36: module references file pycache.top_pool.cpython-36: module references file creating 'dist/cpools-0.0.0-py3.6-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing cpools-0.0.0-py3.6-linux-x86_64.egg removing '/home/qiuhao/.local/lib/python3.6/site-packages/cpools-0.0.0-py3.6-linux-x86_64.egg' (and everything under it) creating /home/qiuhao/.local/lib/python3.6/site-packages/cpools-0.0.0-py3.6-linux-x86_64.egg Extracting cpools-0.0.0-py3.6-linux-x86_64.egg to /home/qiuhao/.local/lib/python3.6/site-packages cpools 0.0.0 is already the active version in easy-install.pth

Installed /home/qiuhao/.local/lib/python3.6/site-packages/cpools-0.0.0-py3.6-linux-x86_64.egg Processing dependencies for cpools==0.0.0 Finished processing dependencies for cpools==0.0.0 ’‘’

but when I run demo.py,it shows: ‘’‘ Traceback (most recent call last): File "/home/qiuhao/CornerNet-Lite/demo.py", line 4, in from core.detectors import CornerNet_Saccade File "/home/qiuhao/CornerNet-Lite/core/detectors.py", line 1, in from .base import Base, load_cfg, load_nnet File "/home/qiuhao/CornerNet-Lite/core/base.py", line 3, in from .nnet.py_factory import NetworkFactory File "/home/qiuhao/CornerNet-Lite/core/nnet/py_factory.py", line 7, in from ..models.py_utils.data_parallel import DataParallel File "/home/qiuhao/CornerNet-Lite/core/models/py_utils/init.py", line 1, in from ._cpools import TopPool, BottomPool, LeftPool, RightPool File "/home/qiuhao/CornerNet-Lite/core/models/py_utils/_cpools/init.py", line 6, in import top_pool, bottom_pool, left_pool, right_pool ModuleNotFoundError: No module named 'top_pool' ’‘’

So how can I sovle it?help me please.

Hhy1024 avatar Oct 10 '19 02:10 Hhy1024

sovle it???

zjp99 avatar Oct 21 '19 11:10 zjp99

@Hhy1024 @zjp99 you can use this command sudo python demo.py

we install Corner Pooling Layers as readme.md,they used python setup.py install --user to install. you maybe install by root user. Or you can try change another user to start demo.py

rabbitegg avatar Nov 18 '19 07:11 rabbitegg

You may not install the MS COCO API as the readme.

berieo avatar Jan 08 '20 05:01 berieo

It needed to make install cocoAPI (Download from https://github.com/philferriere/cocoapi, and unzip cocoapi-master.zip to cocoapi-master. After that, cd to cocoapi-master/PythonAPI and make install ) and cd to CornerNet-Lite/core/models/py_utils/_cpools: python setup.py install. And cd to CornerNet-Lite/core/external deal about Makefile

wandaoyi avatar Dec 27 '20 13:12 wandaoyi

I met the same problem. Did you solved it?

wanghonglie avatar Apr 20 '21 07:04 wanghonglie

Yet, the answer is:  wandaoyi commented Dec 27, 2020

------------------ 原始邮件 ------------------ 发件人: "Honglie @.>; 发送时间: 2021年4月20日(星期二) 下午3:40 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [princeton-vl/CornerNet-Lite] ModuleNotFoundError: No module named 'top_pool' (#119)

I met the same problem. Did you solved it?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

wandaoyi avatar Apr 20 '21 07:04 wandaoyi

It needed to make install cocoAPI (Download from https://github.com/philferriere/cocoapi, and unzip cocoapi-master.zip to cocoapi-master. After that, cd to cocoapi-master/PythonAPI and make install ) and cd to CornerNet-Lite/core/models/py_utils/_cpools: python setup.py install. And cd to CornerNet-Lite/core/external deal about Makefile

I met the same problem. After downloading and installing cocoAPI, there are still problems. Is the location of cocoapi wrong? I also encountered a problem: make get:

python setup.py build_ext --inplace running build_ext rm -rf build process_begin: CreateProcess(NULL, rm -rf build, ...) failed. make (e=2): Makefile:2: recipe for target 'all' failed make: *** [all] Error 2

How to solve it. thanks

Fansgithub2019 avatar Dec 13 '21 08:12 Fansgithub2019