python extensions installed

[Centos python extensions under installation]
pip is a Python package management tool that provides a Python package to find, download, install, uninstall function.
python.org the latest version of the installation package, already comes with the tool.
pip official website: HTTPS: //pypi.org/project/pip/
• determine whether you have installed:
pip --version

easy_install pip is an improved version of the more powerful, it is recommended to use.
However, older versions are provided easy_install only, no pip.

1, easy_install installation
• Method 1, https://bootstrap.pypa.io/ez_setup.py wget -O - | Python
• Method 2, wget --no-check-certificate https://bootstrap.pypa.io/ez_setup .py
Python ez_setup.py --insecure

2, install the upgrade PIP
• Download
https://pypi.python.org/pypi/pip
• extract the
tar xzvf PIP-9.tar.gz
• installation
cd PIP-9
Python setup.py install
• Upgrade
pip install -U pip

3, using [python easy_install management extensions]
• using easy_install mounting extensions
easy_install {package_name}
• certain versions package
easy_install 'package_name} == {{Version}'
• using easy_install upgrade extensions
easy_install -U {package_name}
• remove extensions using easy_install
easy_install -M {package_name}

4, [the use of domestic sources to enhance the image to download and install easy_install Speed]

• add command line parameters
easy_install -i mirror package names source address {}

• modify the configuration file, the source address specified mirror
open pydistutils.cfg
VI ~ / .pydistutils.cfg
writes the following:
[the easy_install]
index_url = HTTP: //pypi.douban.com/simple/


5, using [pip python management extensions]
• using pip mounting extensions
pip_install {package_name}
• certain versions package
pip the install 'package_name} == {{Version}'
• using upgraded extensions pip
pip install -U {package_name }
• To delete extensions use pip
pip Uninstall {package_name}
• lists extensions installed
pip list

6, [the use of domestic sources to enhance the image to download and install pip Speed]

• add command line parameters
pip install --trusted-host -i mirror package names source address {}

• modify the configuration file, specify the mirror source address
to open pip.conf
vi /etc/pip.conf
writes the following:
[, Ltd. Free Join]
index-url = HTTP: //pypi.douban.com/simple/
Trusted-Host = pypi. douban.com


[Installation] ■ pip under ubuntu

1, part of Linux distributions can be directly mounted PIP package manager, such as Debian and the Ubuntu:
the sudo the install Python APT-GET-PIP

Or:
• Download file get-pip.py
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py # download and install script
Note: Which version of Python run the installation script, pip on is linked to which version, if it is Python3 execute the following command:
general pip corresponds to Python 2.7, pip3 corresponds Python 3.x.
sudo python get-pip.py on the installation of PIP
sudo python3 get-pip.py to install pip3


2, check the version you have installed Pip:
PIP-V

3, use the command Pip
pip --help

4, install a new package:
PIP the install the packageName

5, uninstall package:
PIP Uninstall packageName

6, find the package
pip search packageName

7, showing the installation package information
pip show

8, check the specified package of detailed information
pip show -f SomePackage

9 lists the installed package
pip list

10, view scalable package
pip list -o

11, while if the PIP Python3 and Python 2, using the following method:
Python 2:
python2 the install -m PIP XXX
Python3:
to python3 the install -m PIP XXX

安装:
pip2
sudo apt-get install Python-pip python-dev build-essential

pip3
sudo apt-get install pip3
sudo apt install python3-pip

Upgrade
PIP2
sudo install --upgrade PIP PIP

pip3
sudo pip3 install --upgrade pip

Guess you like

Origin www.cnblogs.com/mountain2011/p/11355148.html