PIP - command line utility designed to work with PYPI components. If this program is installed on the computer, it greatly facilitates the process of installing various third-party libraries for the Python programming language. The periodically considered component is updated, its code is improved and innovations are added. Next, we consider the Utility Utility Procedure with two ways.
Update PIP for Python
The package management system will work correctly only when its stable version is used. Periodically program components change their form, as a result, it needs to be updated and PIP. Let's consider two different methods of installing a new assembly that will be the most suitable in certain situations.Method 1: Loading the new version of Python
Pip is put on a PC with Python downloaded from the official site. Therefore, the simplest update option will be downloading the most fresh build Python. Before that, it is not necessary to delete old, you can put a new one or save files elsewhere. First, we recommend to make sure that the installation of the fresh version is necessary. To do this, make the following:
- Open the "Run" window by pressing the Win + R keys combination, enter the CMD and press ENTER.
- In the "Command Line" window, you need to enter what is listed below and click on ENTER:
Python --Version.
- You will display the current assembly of Python. If it is lower below (at the time of this writing, this is 3.7.0), it means that you can update.
The procedure for downloading and unpacking the new version is true:
Go to the official site python
- Go to the official Python website on the link above or through a search in any convenient browser.
- Select the "downloads" section.
- Click on the appropriate button to go to the list of available files.
- In the list, specify the assembly and revision you want to put on your computer.
- The installer program applies to the archive, as an offline or online installer. Find the appropriate and click on its name.
- Wait for download and run the file.
- Be sure to check the box near the "Add Python 3.7 that PATH" item. Thanks to this, the program will be automatically added to the list of system variables.
- Set the installation type "Customize Installation".
- Now you will see a list of all available components. Make sure the item «pip» is activated, then click on «Next».
- Mark the necessary additional parameters and select the location of software components location.
We advise to put Python to the root folder of the system partition on the hard drive.
- Expect installation completion. During this process, do not close the installer window or restart the PC.
- You will be notified that the process completed successfully.
Now a team of PIP package management system of the same name will work correctly with all additional modules and libraries. After installation, you can proceed to the utility and interact with it.
Method 2: Manual update PIP
Sometimes the method with Python just update to obtain the latest version of the PIP is not suitable because of the uselessness of this procedure. In this case, we recommend that you download the package management component manually and then inject it into the program and move on to work. You will need to make a few manipulations:
Go to the download page for PIP
- Go to the official download page PIP the link above.
- Decide an appropriate version of the three proposed.
- Navigate to source code by clicking on the inscription «get-pip.py».
- You will see a full source code package management systems. At any point, press the right mouse button and select "Save As ...".
- Specify a convenient location on your computer and save the data to. His name and type should be left unchanged.
- Locate the file on your PC, click on it and select PTP "Properties".
- With the left mouse button, highlight "Location" and copy it by pressing Ctrl + C.
- Start window "Run" hot keys Win + R, write to cmd and click "OK".
- In the window that opens, enter the cd command, and then paste the above path with a combination of Ctrl + V. Click on Enter.
- You will be in the directory where you saved the file. Now, it must be installed in Python. To do this, enter and activate the following command:
python get-pip.py
- Will begin downloading and installation. During this procedure, do not close the window, do not type anything in it.
- You will be notified of the completion of the installation, this also shows the displayed input field.
This is completed on this process. You can safely use the utility, download additional modules and libraries. However, if errors occur when entering commands, we recommend that you make the following actions, and then go to the "command line" again and start installing PIP.
- The fact is that not always when unpacking, the python of different assemblies is adding system variables. This is most often with the inattention of users. To manually create this data, first go to the Start menu, where press the PCM to "Computer" and select "Properties".
- Several sections will appear on the left. Go to "Advanced System Parameters".
- In the "Advanced" tab, click on "environment variables ...".
- Create a system variable.
- Specify it PythonPath name, enter the following line and click on OK.
C: \ Python№ \ lib; C: \ Python№ \ DLLS; C: \ Python№ \ lib \ lib-tk; C: \ Other-Folder-on-the-path
Where C: - Section of the hard disk where the Python№ folder is located.
Python№ - Directory of the program (the name varies depending on the installed version).
Now you can close all windows, restart the computer and proceed to re-execute the second update PIP package management system.
Alternative method for adding libraries
Not every user has to update PIP and use it built-in utility to add modules to Python. In addition, not all versions of the program work correctly with this system. Therefore, we propose to use an alternative method that does not require the pre-installation of additional components. You need to do the following:
- Go to the module loading site and download them as an archive.
- Open the directory through any convenient archiver and unpack the contents to any empty folder on the PC.
- Move to unpacked files and find the setup.py there. Click on it right-click and select "Properties".
- Copy or remember its location.
- Run the "command line" and via the CD function to the copied directory.
- Enter the following command and activate it:
Python setup.py Install
It remains only to wait for the installation of the installation, after which you can go to work with modules.
As you can see, the PIP update process is quite complicated, but everything will turn out if you follow the above instructions. If the PIP utility does not work or not updated, we offered an alternative method for installing libraries, which in most cases functions correctly.