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