How To Install PIP To Python

Dolyetyus

Co Admin
21 Nis 2020
1,207
670
Delft
Introduction

Welcome Turk Hack Team Members, I'll show you how to install pip today.

PIP is a package management system used to install and manage software packages written in Python. It stands for “preferred installer program” or “Pip Installs Packages.”

PIP for Python is a utility to manage PyPI package installations from the command line.

If you are using an older version of Python on Windows, you may need to install PIP. You can easily install PIP on Windows by downloading the installation package, opening the command line, and launching the installer.

This tutorial will show how to install PIP on Windows, check its version, upgrade, and configure.

how-to-install-pip-to-manage-python-packages-on-windows.png


Prerequisites

  • Computer running Windows or Windows server
  • Access to the Command Prompt window

Step 1: Check if PIP is Already Installed

Before you install PIP on Windows, check if PIP is already installed.

Type in the following command at the command prompt:

Kod:
[COLOR="PaleGreen"]pip help[/COLOR]

If PIP responds, then PIP is installed. Otherwise, there will be an error saying the program could not be found.

PIP is automatically installed with Python 2.7.9+ and Python 3.4+.

PIP also comes with the virtualenv and pyvenv virtual environments.


Step 2: Verify Python Installation

As a Python utility, PIP requires an active Python installation. In newer versions of Python and Python-enabled virtual environments, PIP is already installed, and you do not need to reinstall it.

To determine whether you have Python installed:

Open the Command Prompt window.
When the console window opens, type in:

Kod:
python

If this command is not unrecognized, you need to install Python before you can install PIP.

If the command is recognized, Python responds with its version and a list of commands.

When Python is installed correctly, you should see:

Kod:
[COLOR="PaleGreen"]Python 3.7.0 (v3.7.0:1bf9cc5093, Jan 25 2019, 07:44:31) [MSC v.1914 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.[/COLOR]


Installing PIP On Windows

Step 1: Download PIP get-pip.py

Before installing PIP, download the get-pip.py file: get-pip.py on pypa.io.

Download the file to the desired folder in Windows. You can save the file to any Iocation, but remember the path so you can use it later.


Step 2: Launch Windows Command Line

PIP is a command-line program. When you install PIP, the PIP command is added to your system.

To launch the Command Prompt window:

Press Windows Key + X.
Click Run.
Type in cmd.exe and hit enter.
Alternatively, type cmd in the Windows search bar and click the “Command Prompt” icon.

Both options open the Command Prompt window. However, note that you may need to run the Command Prompt “As Administrator.” If you get an error at any point stating that you don’t have the necessary permissions to perform a task, you will need to open the app as admin.

To run the Command Prompt window “As Administrator,” right-click “Command Prompt” and then select the “Run as…” option.


Step 3: Installing PIP on Windows

Open the Command Prompt if it isn’t already open. Use the cd command followed by a folder name to navigate to the Iocation of the get-pip.py file. This is the folder you previously used as the download Iocation.

To install PIP type in the following:

python get-pip.py
PIP installation should start. If the file isn’t found, double-check the path to the folder where you saved the file.

You can view the contents of your current directory using the following command:

dir

The dir command returns a full listing of the contents of a directory.


Step 4: How to Check PIP Version

To check the current version of PIP, type the following command:

Kod:
[COLOR="PaleGreen"]pip --version[/COLOR]

This command returns the current version of the platform.


Step 5: Verify Installation

Once you’ve installed PIP, you can test whether the installation has been successful by typing the following:

Kod:
[COLOR="palegreen"]pip help[/COLOR]

If PIP has been installed, the program runs, and you should see:

Kod:
[COLOR="PaleGreen"]pip 18.0 from c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip (python 3.7)
[/COLOR]
If you receive an error, repeat the installation process.


Step 6: Configuration

In Windows, the PIP configuration file is %HOME%\pip\pip.ini.

There is also a legacy per-user configuration file. The file is located at %APPDATA%\pip\pip.ini.

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


Upgrading PIP for Python on Windows

New versions of PIP are released occasionally. These versions may improve the functionality or be obligatory for security purposes.

You can upgrade PIP on Windows using the Command Prompt window.

To upgrade PIP on Windows, enter the following in the command prompt:


Kod:
[COLOR="PaleGreen"]python -m pip install --upgrade pip
[/COLOR]
This command first uninstalls the old version of PIP and then installs the most current version of PIP.


Downgrade PIP Version

This may be necessary if a new version of PIP starts performing undesirably.

If you want to downgrade PIP to a prior version, you can do so by specifying the version.

To downgrade PIP, enter:

Kod:
python -m pip install pip==18.1

You should now see the version of PIP that you specified.


Conclusion

Congratulations, you have installed PIP for Python on Windows.

Now that you have PIP up and running, you are ready to manage your Python packages.

//Quoted. Thanks for reading.
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.