Open In App

How to Install PyUSB on Linux?

The PyUSB module or package provides for Python easy access to the host machine’s Universal Serial Bus (USB) system. Generally, it works without any extra code in any environment with python 3.6 and above. In this article, we will learn how to install the PyUSB on the Linux operating system. 

Requirements:



Installing PyUSB package on Linux using PIP

To install the PyUSB package in Linux we have to follow the following steps:

Step 1: Install Python3 on Linux using the following command in the terminal:



sudo apt-get install python3

Step 2: Now, install the pip module which is required to install and manage Python3 packages. So use the following command:

sudo apt install python3-pip

Step 3: Now, install the PyUSB package with the help of the following command:

sudo pip3 install pyusb

Verifying PyUSB package installation on Linux using PIP

To verify if the PyUSB package has been successfully installed in your system run the below command in Terminal:

python3 -m pip show pyusb

You’ll get the following message if the installation is completed successfully without any error.

Article Tags :