I’ve solved this historically with a custom plugin that uses init_unreal.py that appends a config ini defined value into sys.path. I’m actually in the process of submitting a plugin to FAB this week that should address this requirement a few other features. It will be free for personal and $5 for pro. This is what it looks like in my config right now:
You can inject additonal paths with ; as a delimiter which supports both absolute and project directory relative paths. I’ve also added support for applying the Editor Preferences > Data Source Folder that normally is globally set across the entire editor that will get scoped with this plugin to per project on start up.
If you’re trying to do this manually on your own, just add a file called init_unreal.py under your main Content/Python (shows up in Content Browser as /Game/Content asset path) or under any content plugin’s Python directory.
Inside you just need to put the following:
import sys
import os
my_relative_python_path = "../"
sys.path.append(os.path.realpath(unreal.Paths.project_dir() + my_relative_python_path))