且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 Python 中获取当前的导入路径?

更新时间:2023-01-27 13:34:32

python 默认检查的路径位置可以通过检查 sys.path.

The path locations that python checks by default can be inspected by checking sys.path.

import sys
print(sys.path)