I am trying to execute the same program with different arguments by calling :
os.execv(sys.executable, ['python'] + [abs_file_path] + [str(new_arg)])
but when I do that and I get to this line, it attempts to run the file but I get ModuleNotFoundError: No module named 'module name'
referred to the imported modules that i have at the top of the file (for example pandas, which of course i have it installed on my machine) .
Is it a known sort of bug? Why cant it find the modules to import?