How do I install pxssh? Module not found

Randolph Hill picture Randolph Hill · Dec 20, 2016 · Viewed 11.7k times · Source

I get the error message module not found for pxssh.

I am running ubuntu 16.04 with Python 2.7.12 with expect 4.0.1-1.

import pxssh
ImportError: No module named pxssh

Is pxssh included in pexpect

Answer

Railslide picture Railslide · Dec 20, 2016

You need to import pxssh from pexpect:

from pexpect import pxssh

See the examples for the pxssh class from pexpect documentation.