ROLO
ROLO copied to clipboard
import ROLO_utils as utils ImportError: No module named ROLO_utils
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.
there is a ROLO_utils.py ,use it.
change it to
import utils.ROLO_utils as utils
or you can add utils folder to PYTHONPATH variable
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
change it into: import sys sys.path.append("/path/to/utils") import ROLO_utils as utils
Thank you very much, I have solved it.
@Kerrwy I also meet the problem,can u tell me how do you slove it?thanks
How to address the problem?Now I have the same problem,I also add the Path variable,but it doesn't matter.
add " init.py " files to both the rolo folder and utils folder
@stanifrolov @sharmarochan I have the same problem . how can I access to init.py files?
Add blank py files to both folders, with name "init.py"
__ init __
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")?