linux下查找python的安装目录
1、查找docker
docker ps
2、进入docker容器
docker exec -it e23686eaed46 /bin/sh
3、确定python版本
python --version
4、确定pyhon安装目录
首选输入python命令进入python的编码环境。
然后输入下面的打印命令
import sys
print (sys.path)
从截图中看出安装路径是 /usr/lib/python3.8
- Author: 知乎
- Link: https://www.zhihu.hk/Find-the-installation-directory-of-python-under-linux.html
- License: This work is under a 知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议. Kindly fulfill the requirements of the aforementioned License when adapting or creating a derivative of this work.