I'm trying to import many other files into another python file but for some reason it's not finding the python files. I've looked at many questions and answers and tried to follow them but I still have no luck.
The directoory looks like this
my_dir/
one_dir/
_init_.py
script_1.py
parse_lib/
_init_.py
hi.py
(Here I am running script_1.py)
import os, sys, re
import subprocess
import multiprocessing as mp
curpath = os.getcwd()
curdir = os.path.dirname(curpath)
newdir = os.path.join(curdir,"/parse_lib")
sys.path.append(newdir)
print(newdir)
import hi
ImportError: No module named hi
To add: I am not running the python file from the directory where the file resides, as in I'm running it from a completely different directory and not in my_dir/one_dir