Pip is one of the best tools to install and manage Python packages. Pip has earned its fame by the number of applications using this tool. Used for its capabilities in handling binary packages over the easily installed package manager, Pip enables 3rd party package installations. Though the newest versions of Python come with pip installed as a default, this tutorial will show how to install Pip, check its version, and show some basic commands for its use.
What is Python?
Python is an open-source programming language that allows you to run applications and plugins from a wide variety of 3rd party sources (or even applications you develop yourself) on your server. Python is cross-platform, meaning that you can run it on a number of different operating systems, including Windows VPS Server.
Step 1: Check if Pip is Already Installed
Pip is installed by default on many newer Python builds. To check and see if it is already installed on our system, open a command prompt and type the following command.
If Pip is installed, you will receive a message explaining how to use the program. If Pip is not installed, you will get an error message stating that the program is not found.
To open a windows command prompt, press the “Windows Key+R” to open a “Run” dialog box. Next, type in “cmd”, and then click “OK”. This open a normal Command Prompt. To open a command prompt as an administrator, press the “Windows Key+R” to open a “Run” dialog box, then type “cmd” and then press Ctrl+Shift+Enter to open an administrator Command Prompt.
Step 2: Confirm that Python is installed.
The simplest way to test for a Python installation on your Windows server is to open a command prompt. Once a command prompt window opens, type python and press Enter. If Python is installed correctly, you should see output similar to what is shown below.
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
If you receive a message like:
Python is not recognized as an internal or external command, operable program or batch file.
Python is either not installed or the system variable path has not been set. You will need to either launch Python from the folder in which it is installed or adjust your system variables to allow Python to be launched from any location. For more information about installing and using Python.
Step 3: Installing Pip on Windows
Once you have confirmed that Python is installed correctly, we can proceed with installing Pip.
Download get-pip.py to a folder on your computer.
Open a command prompt and navigate to the folder containing the get-pip.py installer.
Run the following command:
Pip should now be installed successfully. If we receive a “file not found” error, double check the directory path to the file. You can use the dir command to view the entire contents of a directory. It should be noted that Pip is installed by default with Python versions Python 2.7.9+ and Python 3.4+. As a side note, Pip also sets up both the virtualenv and pyvenv virtual environments when installed.
Step 4: Verify Installation and Check the Pip Version
We can now verify that Pip was installed correctly by opening a command prompt and entering the following command.
You should see output similar to the following:
pip 18.0 from c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip (python 3.7)
Step 5: Using Pip to Manage Python Packages
Now that Pip is installed and configured, you can begin using it to manage your Python packages. For a brief overview of the available commands and syntax for Pip, open a command prompt and enter:
Step 6: Configuration
The PIP configuration file can be found at %HOME%\pip\pip.ini.
Pip also contains a legacy per-user configuration file. This file is located at %APPDATA%\pip\pip.ini.
You can also specify a custom path location for this config file using the environment variable PIP_CONFIG_FILE.
Like all software, it’s important to keep all of your installations up to date to take advantage of the latest features and security fixes. You can actually use Pip to update itself! To accomplish this, open a command prompt window and enter the following command
python -m pip install --upgrade pip
This command uninstalls the old version of Pip and installs the latest version.
While uncommon, you may need to downgrade to an earlier version of Pip because of compatibility issues. To downgrade to a specific version of Pip, open the command prompt and enter the following command (using the version number you need installed).
python -m pip install pip==18.0
You should now have the desired version of Pip installed. You can verify with the pip -V command.
All of UltaHost’s Windows core-managed servers can run Python and our support team can assist with installation and verification if needed. ActiveState Python 2.6.5 can be installed on Plesk Fully Managed servers if desired.
The Most Helpful Humans In Hosting™
We pride ourselves on being The Most Helpful Humans In Hosting™! Our support staff is always available to assist with any Dedicated, Cloud, or VPS server issues 24 hours a day, 7 days a week 365 days a year.
We are available, via our ticketing systems at support@UltaHost.com,or via a LiveChat for whatever method you prefer. We work hard for you so you can relax.