def add_command_line_sys_path():
    """Function that adds sys.path of the command line to Blender's sys.path"""
    additional_system_paths = get_additional_command_line_sys_path()
    for additional_sys_path in additional_system_paths:
        sys.path.append(additional_sys_path)

    if len(additional_system_paths) > 0:
        addon_name = _get_addon_name()
        prefs = bpy.context.preferences.addons[addon_name].preferences
        prefs.sys_path_list_str = json.dumps(additional_system_paths)
Function that adds sys.path of the command line to Blender's sys.path
photogrammetry_importer/preferences/dependency.py