![]() The following examples are the most commonly used pip3 commands. The basic syntax for pip3 is the following: pip3 Now that pip is installed, you can try to use it. In this step of the article, we will show you a few useful basic pip commands. Then you have the correct version of pip installed for Python 2. Pip 20.1.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7) Once the installation is complete, you can verify the pip version with: pip -V Now you can execute the script with python2 to install pip for Python 2. ![]() Use the following command to download the get-pip.py script: Since PiP for Python2 is not available in the Ubuntu 20.04 repository, in this step we will use the get-pip.py script. To install Python 2 you can run the command: apt install python2 ![]() If for some reason you want to use Python 2 instead of the default Python 3 version, you can follow this section of the article. Pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8) Install PiP for Python 2 (optional) You should have an output similar to the following: pip3 -V When the installation is complete, you can validate the installed pip with the command: pip3 -version You can install pip3 by executing this next command: apt install python3-pipīy executing the above command, all of the dependencies required for pip will be installed along with PiP. ![]() This means that pip3 is not installed on your server. If you get the following output: Command 'pip3' not found You can do this with the command: pip3 -V You should get the following output: python3 -Vīefore proceeding with the installation of pip, it is a good idea to confirm whether pip is already installed on your server. To check if Python 3 is already installed on your server, use the command below: python3 -V We assume that you already have the default Python version installed on your server. You can also restart your server to ensure that all of the latest configuration files get read and used. Of course, you will need to replace Server_IP_Address and Port_Number with your actual server IP address and SSH port number.īy running the following command, all installed packages will be updated and upgraded: apt update & apt upgrade -y First, you need to login to your Ubuntu 20.04 VPS via SSH as the root user account, or as a user with sudo privileges: ssh -p Port_Number
0 Comments
Leave a Reply. |