Skip to content
Related Articles

Related Articles

Installing Python telnetlib module

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 26 Jan, 2022

In this article, we are going to see how to install the telnetlib library in Python. 

The telnetlib module provides a Telnet class that implements the Telnet protocol.  If you have Python installed, the telnetlib library is already installed, but if it isn’t, we can use the pip command to install it.

You can install it by running the following into your command prompt:

pip install telnetlib3

The output will look like this after a successful installation:

To test if it’s installed or not, try importing it into a Python program and running it; if no errors occur, we can conclude that it’s installed and working. You can use this command to import it –

import telnetlib

Alternatively, you can use the code below to see if it’s installed on your system:


# we will be using try and except block
# to identify it is able
# to import it or not
    import telnetlib
    print("not working")



The word “working” appears in the result, indicating that the import was successful.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!