Python Library file path

Source: Internet
Author: User
The import statement in Python imports a library file path that can be viewed through sys.path. Write a simple applet:
1 Import SYS 2 Print Sys.path

To run it, the results on this machine are as follows:

[', '/usr/local/lib/python2.7/dist-packages/paste-1.7.5.1-py2.7.egg ', '/usr/lib/python2.7 ', '/usr/lib/python2.7/ Plat-x86_64-linux-gnu ', '/usr/lib/python2.7/lib-tk ', '/usr/lib/python2.7/lib-old ', '/usr/lib/python2.7/ Lib-dynload ', '/usr/local/lib/python2.7/dist-packages ', '/usr/lib/python2.7/dist-packages '] where, '/usr/local/lib/ Python2.7/dist-packages ' stores the path for the self-compiled Python library file. For example '/usr/local/lib/python2.7/dist-packages/paste-1.7.5.1-py2.7.egg ' is I manually compiled Paste after the program automatically add its path. The Python main library files are stored in the '/usr/lib/python2.7 ' directory. And I have been looking for the urlmap in the '/usr/lib/python2.7/dist-packages/paste ' directory. Since Python maintains at the same time 2. X and 3.X Two versions, so the corresponding directory also exists python3.x folder, structure analogy 2.X.

Python Library file 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.