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

No module named 'utils' #197

Open
GitLiyx opened this issue Aug 14, 2021 · 2 comments
Open

No module named 'utils' #197

GitLiyx opened this issue Aug 14, 2021 · 2 comments

Comments

@GitLiyx
Copy link

GitLiyx commented Aug 14, 2021

Hello!
This error raised when evaluating performance on VOT. In git bash, how can I resolve this problem?How to consider PYTHONPATH design?

$ bash test_mask_refine.sh config_vot.json SiamMask_VOT.pth VOT2016 0
Traceback (most recent call last):
File "C:/Users/lenovo/SiamMask/tools/test.py", line 18, in
from utils.log_helper import init_log, add_file_handler
ModuleNotFoundError: No module named 'utils'

I'm in a hurry. Many thanks!

@A-xuann
Copy link

A-xuann commented Oct 21, 2021

put these orders in front of line 15’‘from utils.log_helper import init_log, add_file_handler’‘,
import sys
import os
if name == 'main':
sys.path.append(os.path.dirname(sys.path[0]))

@qingchunbuhaolan
Copy link

put the folder 'utils' in your virtual environment, just like any other module installed, add to ..Lib\site-packages.

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