Open In App

How to Install ‘Python-Serial’ package on Linux?

Last Updated : 14 Feb, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

PySerial is a Python library. This library provides good support for serial connections (“RS-232”) over a variety of different devices like old-style serial ports, Bluetooth dongles, infra-red ports, and so on. PySerial package encapsulates the access for the serial port. So in this article, we will be installing the PySerial package in Python on Linux operating system.

Installing PySerial package on Linux using PIP

Requirements:

  1. Python3
  2. Python3-pip

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

Step 1: Install the latest version of Python3 on Linux Machine using the following command in the terminal:

sudo apt-get install python3

Installing-Python3

Step 2: Now, using the following command we install the pip module which is required to install and manage all the packages of Python3:

sudo apt install python3-pip

Installing-pip

Step 3: Using the following command we install the PySerial package:

sudo pip3 install pyserial

Installing-PySerial-package

Verifying PySerial package installation on Linux using PIP

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

python3 -m pip show pyserial

You’ll get the following output if the installation is completed successfully in your system.

Verifying-PySerial-package-installation


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads