0

I have two python files my_python.py

# my_pyhton.py
from myPython import my_utils
...
logger = my_utils.get_logger
..

and my_utils.py both in folder myPython:

# my_utils.py
def get_logger():
....

I can run them in eclipse PyDev without any problems, but when I run them in command line, I got error as below:

Traceback (most recent call last):
  File "my_pyhton.py", line 19, in <module>
    from myPyhton import my_utils
ModuleNotFoundError: No module named 'myPython'

How can I do so that I can run them like in eclipse?

mikezang
  • 2,291
  • 7
  • 32
  • 56

1 Answers1

0

This is ok for my case

from my_utils import get_logger, get_driver, get_home_path
mikezang
  • 2,291
  • 7
  • 32
  • 56