• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How To Install PIP in Linux

Written by Rahul, Updated on October 19, 2020

Pip is the standard package manager for the Python programming language. It help you to install and manage packages on your system, which is not a part of the Python standard library. Using Pip you install required dependencies for a Python application. It uses Python Package Index (PyPI) for the packages and install on your system.

In this tutorial, you will learn to install Pip on your Linux based system. Also includes basis commands to work with Pip on your system.

Step 1 – Install PIP

There are several methods available for the Pip installation on any Linux system. You can choose any one method based on your operating system.

  • On Ubuntu/Debian Linux – The default apt repositories contains Pip packages for the installation. Use the following command to install Pip on your Debian system.

    Python 3:

    sudo apt install python3-pip python-dev 
    

    Python 2:

    sudo apt install python2-pip python-dev 
    
  • On Arch Linux – The Arch Linux users can also install pip from official repositories.

    Python 3:

    pacman -S python-pip 
    

    Python 2:

    pacman -S python3-pip 
    
  • Step 2 – Verify Installation

    Check the install version of pip on your system using -V command line switch.

    pip -V      
    pip3 -V          # For specific python version 
    

    To view a list of helpful commands.

    pip --help 
    

    Step 3 – Installing Packages with PIP

    Pip provides a simple command to install or uninstall packages on your system. Pip uses the following command to install any packages on your system.

    pip install package-name  
    

    Also, you can easily remove the package:

    pip uninstall package-name  
    

    Pip can also take the input from a file for the number of packages to install for a specific application. Add all the required packages name with their version with a properly formatted file like requirements.txt file and execute the following command:

    pip install -r requirements.txt 
    

    Reference: https://en.wikipedia.org/wiki/Pip_(package_manager)

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

5 Comments

  1. Avatar Joe Reply
    October 16, 2020 at 8:34 pm

    Update your blog please. Error after error. Last one:

    ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

    We recommend you use –use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

    launchpadlib 1.10.13 requires testresources, which is not installed.

  2. Avatar P. K. Reply
    September 5, 2020 at 4:39 pm

    sudo apt install python3-pip

  3. Avatar jus Reply
    May 26, 2020 at 6:18 am

    “`
    $ python3 get-pip.py
    Traceback (most recent call last):
    File “get-pip.py”, line 23484, in
    main()
    File “get-pip.py”, line 198, in main
    bootstrap(tmpdir=tmpdir)
    File “get-pip.py”, line 82, in bootstrap
    from pip._internal.cli.main import main as pip_entry_point
    File “”, line 259, in load_module
    File “/tmp/tmptdgifx_z/pip.zip/pip/_internal/cli/main.py”, line 10, in
    File “”, line 259, in load_module
    File “/tmp/tmptdgifx_z/pip.zip/pip/_internal/cli/autocompletion.py”, line 9, in
    File “”, line 259, in load_module
    File “/tmp/tmptdgifx_z/pip.zip/pip/_internal/cli/main_parser.py”, line 7, in
    File “”, line 259, in load_module
    File “/tmp/tmptdgifx_z/pip.zip/pip/_internal/cli/cmdoptions.py”, line 19, in
    ModuleNotFoundError: No module named ‘distutils.util’
    “`

    • Avatar Justin W Reply
      August 17, 2020 at 1:15 am

      sudo apt-get install python3-distutils

  4. Avatar Opgamer21 Reply
    December 7, 2019 at 5:37 pm

    You saved me !!!

Leave a Reply Cancel reply

Popular Posts

  • How To Install Python 3.9 on Ubuntu 20.04 5
  • How To Install Python 3.9 on Ubuntu 18.04 0
  • How to Use AppImage on Linux (Beginner Guide) 2
  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy