pip (package manager) for python

refrence: https://pip.pypa.io/en/latest/
html

1. installpython

for unix:bootstrap

$sudo apt-get install python-pip

orcurl

$curl -O https://bootstrap.pypa.io/get-pip.py
$python get-pip.py

download get-pip.py link: get-pip.zipurl

note: you could set mirror of deiban package ftp server to mirrors.163.com debian apt-get sourcelist (mirrors) spa

2. basic commandsunix

  • help command
$pip --help
  • install package ($pip install [package-name])
$pip install threadpool

orcode

$pip install threadpool=1.2.7
  • uninstall package ($pip uninstall [package-name])
$pip uninstall threadpool
  • search  package ($pip search [package-name])
$pip search threadpool

3. configuration mirrorsserver

refrence: http://pip.readthedocs.org/en/docs_rtd/configuration.htmlhtm

On Unix and Mac OS X the configuration file is: $HOME/.pip/pip.conf
On Windows, the configuration file is: %HOME%\pip\pip.ini
[global]
timeout = 60 trusted-host = pypi.douban.com
index-url = http://pypi.douban.com/simple

 You can set a custom path location for the config file using the environment variable PIP_CONFIG_FILE.

PIP_CONFIG_FILE = C:\pip\pip.ini
相關文章
相關標籤/搜索