Python's PIP package management tool is so easy to use.
Python 2.7.9 is automatically installed with this PIP tool, the
PIP is entered under Windows CMD or Linux terminals
, and if this command is not displayed, it
may not be installed or the path (Windows environment variable) is not set.
some centos,ubuntu with PYTHON,PIP are not installed. You can install it this way.
download get-pip.py https://bootstrap.pypa.io/get-pip.py, and
then switch to the directory where get-pip.py files are
entered Python get-pip.py, and then configure a good path, you can use.
Pip Common Commands
Usage: pip <command> [options]
Commands:
Install install packages.
Download download packages.
Uninstall Uninstall packages.
Freeze Output installed packages in requirements format.
List list installed packages.
Show show information about installed packages.
Search Search PyPI for packages.
Wheel build wheels from your requirements.
Hash Compute hashes of package archives.
Completion A helper command used for command completion help for commands
1.1. Install PIP package: sudo pip install Django
1.2. Upgrade package version: sudo pip install Scikit-learn--upgrade 2. When you develop project
There are a lot of dependencies, and when your code is placed in the company's git code warehouse, it's best to perform a
pip freeze >requirements.txt
to put your dependencies into requirements.txt files.
team colleagues, you need to use your code,
pip Install-r requirements.txt, you
can install the project's dependency pack.
3. PIP View installed packages
Pip freeze can see all installed 3rd party packs
4, the PIP can choose to install a different version
Install a third party library first
$ pip Install yolk
$ yolk-v Django Django
1.10rc1 Django
1.10b1 Django
1.10a1
Django 1.9.8 Django 1.9.7 ....
....
Django 1.3.6
Django 1.3.5 Django
1.2.7 Django
1.1.4 Django
1.0.4
This way pip install django==1.9.8 which version you want to install.