Home > Backend Development > Python Tutorial > How to Install PIP on Windows: Official and Alternative Methods?

How to Install PIP on Windows: Official and Alternative Methods?

Mary-Kate Olsen
Release: 2024-12-23 13:20:37
Original
740 people have browsed it

How to Install PIP on Windows: Official and Alternative Methods?

Installing PIP on Windows

Official Instructions

According to pip's official documentation, you should proceed as follows:

  1. Download get-pip.py, being careful to save it as a .py file rather than .txt.
  2. Run the downloaded file from the command prompt: python get-pip.py.
  3. You may need administrator privileges to complete this step.

Alternative Instructions

For easier installation, consider using Christoph Gohlke's Windows installers (.msi) for popular Python packages, including pip.

  1. Install setuptools.
  2. Install pip.

Pip will typically be installed at C:Python27Scriptspip.exe. Add the folder containing pip.exe to your path (e.g., C:Python27Scripts).

Proxy Problems

If you're working behind an HTTP proxy, set the environment variables http_proxy and https_proxy. Example syntax:

  • http://proxy_url:port
  • http://username:password@proxy_url:port

Unable to Find vcvarsall.bat

This cryptic error message indicates that Pip is unable to compile from source. Install a C/C compiler such as MinGW, Visual C , or Microsoft Visual C Compiler for Python 2.7. Alternatively, check Christoph Gohlke's site for your package.

The above is the detailed content of How to Install PIP on Windows: Official and Alternative Methods?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template