Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Linux Tutorials»How To Install PIP in Linux

    How To Install PIP in Linux

    By RahulOctober 19, 20202 Mins Read

    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.

    Advertisement

    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)

    PIP pip3 Python
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Understanding 2>&1 in Bash: A Beginner’s Guide

    How to Choose the Best Shebang (#!) for Your Shell Scripts

    What are the Python Static Variables

    View 5 Comments

    5 Comments

    1. Joe on October 16, 2020 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.

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

      sudo apt install python3-pip

      Reply
    3. jus on May 26, 2020 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’
      “`

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

        sudo apt-get install python3-distutils

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

      You saved me !!!

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • How to List Manually Installed Packages in Ubuntu & Debian
    • 10 Bash Tricks Every Developer Should Know
    • How to Validate Email Address in JavaScript
    • Firewalld: Common Firewall Rules and Commands
    • 12 Apk Commands in Alpine Linux Package Management
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.