Open In App

How to Install Python-USPP on Linux?

Last Updated : 13 Jun, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Python-USPP is a multi-platform Python library that allows communication between Python programs and USPP devices. This library is written in Python itself. It supports Windows, Linux, and MacOS. In this article, we will learn how to install this library in the Linux operating system.

Python USPP installation on Linux

The python uspp has been developed by ibarona, to access serial ports of uspp. There can be two ways by which we can install Pythondetail uspp on our Linux system. The first method is to use pip, and the second method is by cloning repo on GitHubPython, by ibarona. The following methods have been explained in detail below:

Method 1: Using pip

To install the python-uspp library using pip you need to follow the steps mentioned below:

Note: This method might not work in most of the new versions of linux because the USPP module was tested on Windows XP, Vista, and linux older versions. But you can try if method one does not work then go with the second method.

Step 1: Open the Terminal & Update Packages list. To do so you can navigate to the applications menu and select Terminal. We can also use the shortcut key Ctrl+ Alt+ T to open a new terminal. Then, write the command mentioned below.

Command: sudo apt update

updating packages, by sudo apt udpate in linux

Step 2: Use pip to install the USPP library to do so. Type pip install python-uspp, and press Enter.

Command: pip install python-uspp

pip isntall python uspp in linux

Note: You may be asked to enter the password if you are not logged in as root. Enter password when prompted.

Step 3: python-uspp has been successfully installed, to verify the installation, run Python in your terminal by typing python or python3 this will open Python interactive shell and ensure no errors occur. After installing, our next step is to import the library, type import uspp to import the library we just installed. If no error message appears, then the installation was successful.

Command: import uspp

importing uspp in linux after installing

Method 2: Cloning Python-USPP Git Reop

Step 1: Go to the python-uspp git repository, by typing ibarona/uspp in search-box, in GitHub. Now, copy the source URL and use git clone “URL” command, to download the Source Code from the python-uspp GitHub repository.

Command: git clone https://github.com/ibarona/uspp

cloning git repository for uspp in linux

Step 2: To verify the installation, run Python in your terminal by typing python or python3 this will open Python interactive shell and ensure no errors occur.

Command: python

verifying installation by python in linux

Step 3: We have successfully installed python-uspp in our Linux system. Now, our next task is to import the uspp. Use the below command to import uspp. If no error message appears, then, the import was successful.

Command: from uspp import *

importing uspp in linux


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads