import python module (which contains other imports) with full path

Viewed 38

I know there are a lot of similar questions, but I couldn't find an appropriate answer to my "problem".

I want to import my own module from full path, but this module contains imports from the active environment.

For now, I've tried:

import sys
sys.path.append('path_to_my_module')
import my_module

This solution works until there is an import statement inside my_module, which targets a librariy/module of the active environment. Then the following error is raised:

ImportError: Dll Load Failed: The specified module could not be found.

Is there any solution to this?

Best, Lennart

0 Answers
Related