This article describes how to view the Python installation path and installation package path tips. This article uses the method of running Python code directly on the command line to check the installation path and installation package path, for more information about how to install django, see install multiple python in linux. sometimes, you cannot find the absolute path of python, or install django .. Of course, there are many methods to view, which are listed here for reference by inexperienced people.
The code is as follows:
G: \ code \ moniter> python-c "from distutils. sysconfig import get_python_lib; print (get_python_lib ())"
C: \ Python27 \ Lib \ site-packages
G: \ code \ moniter> python-c "import OS; print OS. _ file __"
C: \ Python27 \ lib \ OS. pyc
G: \ code \ moniter> python-c "import sys; print sys.exe cutable"
C: \ Python27 \ python.exe
In fact, you only need to know the python home path.