0


I have the following python files:
help_functions.py
check.py
I'm trying to import help_functions file from check file (both files in the same directory) with the following command:

from help_functions import Utils

after running it from cmd with WLST which has Python 2.2 interpreter I get the following error:
ImportError:no module named help_functions

any idea what should I do to make it recognize the help_functions file?

  • I am having no problem importing them. – Vineeth Sai Sep 03 '18 at 14:18
  • Importing fine in my machine. Cannot reproduce your error. – saketk21 Sep 03 '18 at 14:24
  • he probably is calling them from a different directory where you are calling them from within the directory, python checks for modules in your current working directory. Probably need to add an __init__.py file in there – E.Serra Sep 03 '18 at 14:25

1 Answers1

0

Short answer: add the scripts containing folder (full path, not relative) to your PYTHONPATH environment variable.

Long answer: your scope is not what you think it is. See this answer for more details: ImportError: No module named... (basics?)

BoboDarph
  • 2,751
  • 1
  • 10
  • 15