pip documentation v22.0.3 (pypa.io)

configuration: https://pip.pypa.io/en/stable/topics/configuration/

pip: package installer for Python

 

PyPi: Python package index

 

Python: pip

   

Linux:

配置文件路径:/etc/pip.conf  ~/.pip/pip.conf

 

Windows:

配置文件路径:%appdata%\pip\pip.ini  %userprofile%\pip\pip.ini

 

常用配置:

 

[global]
index-url=http://mirrors.aliyun.com/pypi/simple
extra-index-url=https://pypi.tuna.tsinghua.edu.cn/simple
# proxy=http://user:password@proxy_name:port
timeout=120
trusted-host=mirrors.aliyun.com
quiet=0
verbose=2


[install]
ignore-installed=true
no-compile=false
no-dependencies=false
no-warn-script-location=false


[freeze]
timeout=10

 

 

 

常用用法: 

  1. pip search -v
  2. pip installpip uninstall
    1. pip install --requirement | -r requirements             Install from the given requirements file
    2. pip install --upgrade | -U              Upgrade all specified packages
  3. pip list -v                    list installed packges  
  4. pip freeze -v  Ouput installed packges in requirements format
  5. pip show       Show information about installed packages
    pip show -f | --files   Show the full list of installed files
  6. pip completion --bash >> .bash_profile      Command completion
  7. for b in $(pip list --outdated | tail -n +3 | awk '{print $1}');do pip install --upgraed $b;done    升级所有--outdated包
  8. pip install tea 'cup >= 3.13'

whl安装和使用:

wheel文件的本质就是zip或rar,其方便python的安装和使用,pip install.

scikit_learn‑0.19.1‑cp27‑cp27m‑win32.whl

cp27  <==> cpython2.7

win32 <==> 32bits

cp37 <==> cpython3.7

win_amd64 <==> 64bits

whl下载站:https://www.lfd.uci.edu/~gohlke/pythonlibs/

相关文章:

  • 2022-12-23
  • 2022-02-09
  • 2021-05-18
  • 2021-09-09
  • 2022-01-27
  • 2021-09-03
  • 2021-06-15
  • 2022-12-23
猜你喜欢
  • 2022-02-23
  • 2022-01-02
  • 2021-09-14
  • 2021-09-15
相关资源
相似解决方案