Python默认安装后,经常忘记如何查看安装路径,但又时常用的到,因此记录下命令行模式输入:
>>> import sys >>> sys.path ['', 'D:\Users\lyangh\AppData\Local\Programs\Python\Python37\python37.zip', 'D:\Users\lyangh\AppData\Local\Programs\Python\Python37\DLLs', 'D:\Users\lyangh\AppData\Local\Programs\Python\Python37\lib', 'D: \Users\lyangh\AppData\Local\Programs\Python\Python37', 'D:\Users\lyangh\AppData\Roaming\Python\Python37\site-packages', 'D:\Users\lyangh\AppData\Local\Programs\Python\Python37\lib\site-packages'] >>>