如何查看Python 安装位置以及已经安装的库

来源:互联网 发布:上海宏知检测 编辑:程序博客网 时间:2024/06/10 06:48

如何查看Python 安装位置以及已经安装的库

步骤一:
1. Start 一个command prompt
2. 找到电脑中已经安装的Python 位置:

where python

打开路径, cd 到输出的路径,之后

start.

commandPrompt 图示
显示pip安装的所有库

pip list <or> pip freeze

pip list

pip freeze
查看过时的库

pip list --outdated

outdated
步骤二:
如果是从python 的command line 里面查看,可以使用如下命令(python 3.x)

import sysprint(sys.path)

python结果

python 标准库位置: %python安装路径%\Lib

Example: C:\Users\ref3oz\AppData\Local\Programs\Python\Python35\Lib

第三方库位置: %python安装路径%\Lib\site-packages

Example: C:\Users\ref3oz\AppData\Local\Programs\Python\Python35\Lib\site-packages

阅读全文
0 0
原创粉丝点击