ROLO icon indicating copy to clipboard operation
ROLO copied to clipboard

import ROLO_utils as utils ImportError: No module named ROLO_utils

Open Kerrwy opened this issue 7 years ago • 13 comments

When I run the codes, there is always a mistake: import ROLO_utils as utils ImportError: No module named ROLO_utils, would you tell me how to solve this problem?

Thank you and look forward to your answer.

Kerrwy avatar Apr 17 '17 01:04 Kerrwy

there is a ROLO_utils.py ,use it.

Kerrwy avatar Apr 17 '17 03:04 Kerrwy

change it to import utils.ROLO_utils as utils

alexrakowski avatar May 09 '17 16:05 alexrakowski

or you can add utils folder to PYTHONPATH variable

cevatbostancioglu avatar May 12 '17 22:05 cevatbostancioglu

You may also need to add __init__.py files to treat the directories as python packages. Also try to use from utils import ROLO_utils as utils

stanifrolov avatar Jun 08 '17 13:06 stanifrolov

change it into: import sys sys.path.append("/path/to/utils") import ROLO_utils as utils

Vivianyzw avatar Jun 26 '17 08:06 Vivianyzw

Thank you very much, I have solved it.

Kerrwy avatar Jun 26 '17 08:06 Kerrwy

@Kerrwy I also meet the problem,can u tell me how do you slove it?thanks

wingNine avatar Apr 13 '18 12:04 wingNine

How to address the problem?Now I have the same problem,I also add the Path variable,but it doesn't matter.

helloxueen avatar Jun 26 '18 08:06 helloxueen

add " init.py " files to both the rolo folder and utils folder

sharmarochan avatar Jul 28 '18 07:07 sharmarochan

@stanifrolov @sharmarochan I have the same problem . how can I access to init.py files?

pari93411 avatar Aug 27 '19 12:08 pari93411

Add blank py files to both folders, with name "init.py"

sharmarochan avatar Aug 28 '19 17:08 sharmarochan

__ init __

sharmarochan avatar Aug 28 '19 17:08 sharmarochan

anyone p;ease help me when i run this code i face this error. SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Input file with correct format not found.\n")?

Noumanijaz744 avatar Sep 02 '21 14:09 Noumanijaz744