获取 python 包的路径

Posted wangjq19920210

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了获取 python 包的路径相关的知识,希望对你有一定的参考价值。

root@ostack01:~# python
Python 2.7.12 (default, Nov 19 2018, 06:48:02) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml
>>> yaml.__file__
/usr/local/lib/python2.7/dist-packages/yaml/__init__.pyc

 

以上是关于获取 python 包的路径的主要内容,如果未能解决你的问题,请参考以下文章