推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
lovebeyondalways
V2EX  ›  Python

请问如何获取 python 模块安装路径

  •  
  •   lovebeyondalways ·
    piaokorg · May 8, 2016 · 6186 views
    This topic created in 3681 days ago, the information mentioned may be changed or developed.

    ###描述
    最近学到 python 的第三方模块的使用,默认的话模块会安装在哪?
    如果想知道某个特地模块的安装路径如何获取

    4 replies    2016-05-09 14:46:17 +08:00
    boneyao
        1
    boneyao  
       May 8, 2016   ❤️ 1
    >>> import string
    >>> string.__file__
    '/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/string.pyc'
    推荐你使用 http://docs.python-guide.org/en/latest/dev/virtualenvs/
    lovebeyondalways
        2
    lovebeyondalways  
    OP
       May 8, 2016 via Android
    @boneyao 感谢
    oglop
        3
    oglop  
       May 9, 2016   ❤️ 1
    pip list
    pip show <package>
    IanPeverell
        4
    IanPeverell  
       May 9, 2016
    >>>import sys
    >>>sys.path
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   893 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 22:36 · PVG 06:36 · LAX 15:36 · JFK 18:36
    ♥ Do have faith in what you're doing.