import sys
print(sys.path)
输出结果:
['C:\\Users\\AI\\PycharmProjects\\untitled', 'C:\\Users\\AI\\PycharmProjects\\untitled', 'D:\\Anaconda3\\python36.zip', 'D:\\Anaconda3\\DLLs', 'D:\\Anaconda3\\lib', 'D:\\Anaconda3', 'D:\\Anaconda3\\lib\\site-packages', 'D:\\Anaconda3\\lib\\site-packages\\Sphinx-1.5.1-py3.6.egg', 'D:\\Anaconda3\\lib\\site-packages\\featuretools-0.3.0-py3.6.egg', 'D:\\Anaconda3\\lib\\site-packages\\distributed-1.23.0-py3.6.egg', 'D:\\Anaconda3\\lib\\site-packages\\pympler-0.6-py3.6.egg', 'D:\\Anaconda3\\lib\\site-packages\\cloudpickle-0.5.5-py3.6.egg', 'D:\\Anaconda3\\lib\\site-packages\\zict-0.1.3-py3.6.egg', 'D:\\Anaconda3\\lib\\site-packages\\tornado-5.1-py3.6-win-amd64.egg', 'D:\\Anaconda3\\lib\\site-packages\\win32', 'D:\\Anaconda3\\lib\\site-packages\\win32\\lib', 'D:\\Anaconda3\\lib\\site-packages\\Pythonwin', 'D:\\Anaconda3\\lib\\site-packages\\setuptools-27.2.0-py3.6.egg', 'D:\\pycharm\\PyCharm 2018.2\\helpers\\pycharm_matplotlib_backend']