查看linux下python3安装位置

执行python3命令,回车

root@rrdloan-server:~/anaconda2/bin# python3
Python 3.6.8 (default, Oct 7 2019, 12:59:55)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

>>> import django
>>> print(django)
<module 'django' from '/usr/local/lib/python3.6/dist-packages/django/__init__.py'>
>>>

此时就知道python3安装位置在/usr/local/lib/python3.6/目录了

python2同理

原文地址:https://www.cnblogs.com/erhangboke/p/11661778.html