Skip to content
Related Articles
Open in App
Not now

Related Articles

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

Improve Article
Save Article
  • Last Updated : 14 Feb, 2022
Improve Article
Save Article

Pyexpect package in Python. This package is used to allow concise assertions which generate predictable and good error messages. It is a Python Exception library. This package is cross-platformed and is available on the Windows, Linux, and macOS operating systems. So in this article, we will be installing the Pyexpect package in Python on Linux operating system using Python-Pip.

Installing pyExpect package on Linux using PIP


  1. Python3
  2. Python3-pip

To install the pyExpect 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


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


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

sudo pip3 install pyexpect


Verifying pyExpect package installation on Linux using PIP

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

python3 -m pip show pyexpect

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


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!