查看Python及库的安装目录

it2023-06-02  70

关于“查看Python安装目录及其库的安装位置”,无意中翻到了以前初学Python时的一篇note,贴出如下:


一、查看Python安装目录

两种简单方法如下:

方法1

在CMD窗口使用windows cmd的where命令:

where python 方法2

进入python交互式环境ipython后,输入

import sys sys.executable

二、查看库的安装位置

python 标准库位置:

%python安装路径%\Lib

第三方库位置:

%python安装路径%\Lib\site-packages

 

 

最新回复(0)