美文网首页
python笔记10: pip

python笔记10: pip

作者: _百草_ | 来源:发表于2022-04-17 21:16 被阅读0次
    • pip show pkg_name 查看第三方包的依赖包和被依赖包
    C:\pythonProject>pip show pysnooper
    Name: PySnooper
    Version: 0.4.2
    Summary: A poor man's debugger for Python.
    Home-page: https://github.com/cool-RR/PySnooper
    Author: Ram Rachum
    Author-email: ram@rachum.com
    License: UNKNOWN
    Location: c:\python\python39\lib\site-packages  # 位置
    Requires:  # 依赖包
    Required-by:  #被依赖包
    

    • pip install 三方库 安装三方库
      ** -i 源

    清华:https://pypi.tuna.tsinghua.edu.cn/simple
    中国科学技术大学 : https://pypi.mirrors.ustc.edu.cn/simple
    豆瓣:http://pypi.douban.com/simple/
    百度:https://mirror.baidu.com/pypi/simple
    阿里云:http://mirrors.aliyun.com/pypi/simple/

    ** -r <file>
    -r, --requirement 从给定的需求文件安装。此选项可以多次使用


    • pip freeze获取已安装的模块及对应的版本
      pip freeze

    • pip show <module>查看安装版本
    C:\WINDOWS\system32>pip show pytest
    Name: pytest
    Version: 6.2.2
    Summary: pytest: simple powerful testing with Python
    Home-page: https://docs.pytest.org/en/latest/
    Author: Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others
    Author-email: None
    License: MIT
    Location: c:\me\testing\python\python39\lib\site-packages
    Requires: attrs, toml, atomicwrites, py, iniconfig, pluggy, packaging, colorama
    Required-by:
    
    C:\WINDOWS\system32>
    
    

    • 其他详情
    1. Python pip 安装与使用
    2. python 查看某个第三方包的依赖包和被依赖包以及指定pip源安装
    3. python pip安装镜像源

    相关文章

      网友评论

          本文标题:python笔记10: pip

          本文链接:https://www.haomeiwen.com/subject/ptgisrtx.html