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

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

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

where python

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

start.

《如何查看Python 安装位置以及已经安装的库》
显示pip安装的所有库

pip list <or> pip freeze

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

《如何查看Python 安装位置以及已经安装的库》
查看过时的库

pip list --outdated

《如何查看Python 安装位置以及已经安装的库》
步骤二:
如果是从python 的command line 里面查看,可以使用如下命令(python 3.x)

import sys
print(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

    原文作者:JennyChen333
    原文地址: https://blog.csdn.net/JennyChen66/article/details/78487228
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞