Python Windows installation pip

Source: Internet
Author: User

The Windows system installs the Python interpreter first:

Windows version exe installation file: Https://www.python.org/ftp/python/2.7.12/python-2.7.12.msi

Linux version exe installation file https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz

Install next next know to finish

Configuring Environment variables

Then type python-v on the cmd command line to get the Python version information. Installation Complete

Install PIP

Download pip:https://pypi.python.org/pypi?:action=show_md5&digest=87083c0b9867963b29f7aba3613e8f4a

After the download has been unpacked, open the Extract directory, address bar cmd execute command: Python setup.py install

After the installation is complete, go to the Python installation directory, for example: D:\Program_Files\d-Ear\Python\Scripts Configuration to environment variables

The PIP list will be able to view the installation information.

Pip Common commands:

List installed Packages

pip freezeor pip list

Export Requirements.txt

pip freeze > <目录>/requirements.txt

installation package Online Installation

pip install <包名>or pip install -r requirements.txt

Specify the version by using = = >= <= > <, and install the latest version without writing

The Requirements.txt content format is:

Apscheduler==2.1.2django==1.5.  4mysql-connector-python==2.0.  1mysql-python==1.2.  3pil==1.1.  7south==1.0.  2django-grappelli==2.6.  3django-pagination==1.0.  7                   
Install the Local installation package

pip install <目录>/<文件名>or pip install --use-wheel --no-index --find-links=wheelhouse/ <包名>

< package name > previous space

can be shortened to

pip install --no-index -f=<目录>/ <包名>

Uninstalling packages

pip uninstall <包名>or pip uninstall -r requirements.txt

Upgrade Package

pip install -U <包名>

Or: Pip Install < package name >--upgrade

Upgrade Pip

pip install -U pip

Show the directory where the package resides

pip show -f <包名>

Search Packages

pip search <搜索关键字>

Querying packages that can be upgraded

pip list -o

Download the package without installing

pip install <包名> -d <目录>or pip install -d <目录> -r requirements.txt

Packaged

pip wheel <包名>

PIP Replacement Software Image source

Install PIP source under Windows

Create a PIP directory directly in the user directory, such as: C:\Users\xx\pip, new file Pip.ini:
[Global]
Timeout = 6000
Index-url =http/pypi.douban.com/simple
Trusted-host =http/pypi.douban.com There is also a version
    1. Users who use the PIP can be configured as follows:
    2. In Unix and MacOS, the configuration file is: $HOME/.pip/pip.conf
    3. On Windows, the configuration file is:%home%\pip\pip.ini
    4. You need to add the following in the configuration file:
    5. [Global]
    6. Index-url=http://mirrors.tuna.tsinghua.edu.cn/pypi/simple

Python Windows installation pip

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.