import os import sys os.chdir(sys.path[0]) 在文件首加入上面这句话即可 相关文章: 2021-06-13 2021-08-02 2021-06-26 2022-02-03 2022-12-23 2021-12-28 2022-12-23