Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: No module named pxssh

I am trying to use pxssh module to make SSH connection to the client - however I am getting:

ImportError: No module named pxssh

I found this file in Python installation so I would guess that's correct:

/usr/lib/python2.7/site-packages/pexpect/pxssh.py

I am of course running my app with Python 2.7 and I've even tried to import pexpect, but that didn't help.

like image 395
Petr Mensik Avatar asked Feb 19 '14 14:02

Petr Mensik


2 Answers

Well, try from pexpect import pxssh.

update:


The solution only works for Linux as pxssh is not supported on Windows

like image 177
zhangxaochen Avatar answered Oct 18 '22 05:10

zhangxaochen


If the problem is not resolved by the earlier suggestion:

from pexpect import pxssh

The pexpect library might be outdated, so run:

 sudo pip install pexpect --upgrade
like image 8
anask Avatar answered Oct 18 '22 07:10

anask