Horje
How to Install Python-sh on Linux?

In python, the sh package is a full-fledged sub-process replacement for Python 2.6 – 3.8, PyPy, and PyPy3 that allows you to call any program as if it were a function. So, in this article, we will be installing the sh package in Python on Linux operating system.

Installing Sh package on Linux using PIP

Requirements:

  1. Python3
  2. Python3-pip

To install the Sh 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-module

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

sudo pip3 install sh

Installing-sh-package

Verifying Sh package installation on Linux using PIP

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

python3 -m pip show sh

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

verifying-sh-package-installation




Reffered: https://www.geeksforgeeks.org


Geeks Premier League

Related
How to Install Deepin on Linux? How to Install Deepin on Linux?
Administrative System of Chhatrapati Shivaji Maharaj Administrative System of Chhatrapati Shivaji Maharaj
How to Download and Install LibreCAD on Windows? How to Download and Install LibreCAD on Windows?
How to Type Check an Object in Kotlin? How to Type Check an Object in Kotlin?
Servlet - Credential Cookies Servlet - Credential Cookies

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
9