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

few_shot.utils is not found #47

Open
Sonu-rgukt opened this issue Mar 4, 2024 · 1 comment
Open

few_shot.utils is not found #47

Sonu-rgukt opened this issue Mar 4, 2024 · 1 comment

Comments

@Sonu-rgukt
Copy link

!python /content/few-shot/scripts/prepare_omniglot.py

Traceback (most recent call last):
File "/content/few-shot/scripts/prepare_omniglot.py", line 20, in
from few_shot.utils import mkdir, rmdir
ModuleNotFoundError: No module named 'few_shot.utils'

I am getting this error, can anyone help me with this ...

@ademjest
Copy link

I used to meet that problem, you can add root path before import few_shot.utils:

    import os
    import sys
    project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
    sys.path.insert(0, project_root)

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