直接在site-packages 目录下新建一个 .pth文件,然后将模块的路径写进去: /code/crontab_test/utils 然后可以去python终端下: import sys sys.path 看下路径是正常写进去。