在Deepin系统中查看已安装的Python版本,您可以使用以下命令:
1. 查看Python版本:
对于Python 2.x版本,使用命令 `python -V`。
对于Python 3.x版本,使用命令 `python3 -V`。
2. 查看系统中安装了哪些版本的Python:
使用命令 `ls /usr/bin/python*` 查看所有Python可执行文件。
3. 使用`update-alternatives`来更改Python版本(如果已配置):
列出所有可用的Python版本信息:`update-alternatives --list python`。
4. 查看Python已安装的库:
使用命令 `pip list` 列出所有已安装的Python库及其版本。
使用命令 `pip freeze > requirements.txt` 将已安装的库及其版本保存到文件。
使用命令 `python -m site` 查找Python库的安装路径。
在Python交互式解释器中导入库并使用 `help(库名)` 查看库的文档。