1

These is my folders. they are inside the parent folder

 programs -> parent folder
      program -> folder
         python_code.py
      program_two -> folder
         another_python_code.py

in another_python_code.py, I wrote code like this to call the python_code.py

from program.python_code import class_name

but I am getting an error saying

from program.python_code import class_name
ModuleNotFoundError: No module named 'program'

I do have init file in both places

I am using python 3.8

Ishk
  • 15
  • 3
  • 1
    https://stackoverflow.com/questions/59257204/how-do-i-import-a-file-that-is-in-another-directory This was asked about 10 minutes ago... – user1558604 Dec 09 '19 at 22:03

0 Answers0