In today’s tutorial, we are going to go over how to install Python and Pip for your python projects. The first part of this tutorial will go over how to install it on a Ubuntu server, while the second part will go over how to do so on a Windows environment.
Install Python and Pip on Ubuntu Server
Before installing python, you can check whether python is installed on your server running command below
If python is not installed — you can install it by running below command:
sudo apt install python3 -y
Installing pip package manager
After installing python, if you type pip on your terminal, you will see message: command not found
Since, we don’t pip package manager installed, run below command to install pip:
sudo apt install python3-pip -y
This module is very important for building your python projects, now let’s see how to install package using pip
pip3 install numpy
If you wish to upgrade any package using pip run below command:
pip3 install -–upgrade numpy
Installing Python on Windows
Open your cmd window in your windows VPS. You can download latest version python following the link below and run the installation:
Once installed, you can validate the version using cmd by running below command:
Next, run the below command on cmd – which will download the pip package manager for you.
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
After successfully downloading the pip packager manager, run below command to install pip on your windows VPS server.
To install a package using pip, run the below command:
pip3 install selenium