Tips for viewing the Python installation path and installation package path

Source: Internet
Author: User
Tags install django
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.