zoukankan      html  css  js  c++  java
  • python pip常用命令、配置pip源

    1、查找软件

    # pip search Package
    

    2、安装软件

    # pip install Package
    # pip install -r requirements.txt
    

    3、更新软件

    # pip install -U Package
    

    4、卸载软件

    # pip uninstall Package
    

    5、列出已安装软件

    # pip list
    # pip freeze
    # pip freeze -r requirements.txt
    

    6、查看一个软件包时安装了哪些文件

    # pip show -f Package
    

    7、命令补全

    # pip completion --bash >> .bash_profile
    

    8、升级所有包

    # for i in `pip list --outdated --trusted-host pypi.douban.com | tail -n +3 | awk '{print $1}'`; do pip install -U $i; done
    

    9、修改pip安装源。在mac上需要自己创建.pip/目录和配置文件。

    # mkdir ~/.pip
    # vim ~/.pip/pip.conf
    

    阿里源

    [global]
    index-url = http://mirrors.aliyun.com/pypi/simple/
    trusted-host = mirrors.aliyun.com
    

    豆瓣源

    [global]
    index-url = http://pypi.douban.com/simple
    trusted-host = pypi.douban.com
    
  • 相关阅读:
    [包计划] date-fns
    [包计划] create-react-app
    [包计划] js-cookie
    [包计划] cheerio
    [包计划] 30-seconds-of-code
    new
    [源计划] array-first
    [源计划] is-sorted
    [源计划] array-flatten
    images
  • 原文地址:https://www.cnblogs.com/samRoot/p/13325306.html
Copyright © 2011-2022 走看看