把当前文件所在目录的上一目录加入环境变量 import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))