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: cannot import name 'bbox' from partially initialized module 'lib.utils' (most likely due to a circular import) (/home/barry/Github/chinese_ocr/ctpn/lib/utils/__init__.py) #481

Open
Barry1915 opened this issue Sep 1, 2021 · 3 comments

Comments

@Barry1915
Copy link

Traceback (most recent call last):
File "/home/barry/Github/chinese_ocr/demo.py", line 3, in
import ocr
File "/home/barry/Github/chinese_ocr/ocr.py", line 10, in
from ctpn.text_detect import text_detect
File "/home/barry/Github/chinese_ocr/ctpn/text_detect.py", line 6, in
from lib.utils.timer import Timer
File "/home/barry/Github/chinese_ocr/ctpn/lib/init.py", line 1, in
from . import fast_rcnn
File "/home/barry/Github/chinese_ocr/ctpn/lib/fast_rcnn/init.py", line 2, in
from . import train
File "/home/barry/Github/chinese_ocr/ctpn/lib/fast_rcnn/train.py", line 5, in
from ..roi_data_layer.layer import RoIDataLayer
File "/home/barry/Github/chinese_ocr/ctpn/lib/roi_data_layer/init.py", line 1, in
from . import roidb
File "/home/barry/Github/chinese_ocr/ctpn/lib/roi_data_layer/roidb.py", line 5, in
from lib.utils.bbox import bbox_overlaps
File "/home/barry/Github/chinese_ocr/ctpn/lib/utils/init.py", line 4, in
from . import bbox
ImportError: cannot import name 'bbox' from partially initialized module 'lib.utils' (most likely due to a circular import) (/home/barry/Github/chinese_ocr/ctpn/lib/utils/init.py)

@Barry1915
Copy link
Author

谁能帮帮我解决一下这个问题啊

@wxydaydayup
Copy link

在报错的地方上面加上这两行
import pyximport
pyximport.install()

@nissansz
Copy link

import pyximport
pyximport.install()

win10下也报这个错误。怎么解决?微信 nlanguage

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

3 participants