title: Python and Pexpect -- Pxssh is installed but not available
body: <p>I have the same problem as this poster:  <a href="https://stackoverflow.com/questions/36087711/cant-import-pxssh-from-pexpect">Can&#39;t import pxssh from pexpect</a></p>
  
  <p>However, the solutions which worked for the above poster are not working for me.</p>
  
  <p>Here's the problem...  I am a Python newbie writing a Python script (Python 2.7.5) and have installed pexpect 4.6.0.  I can import and use pexpect in my code.  However, I need to use pxssh, and that is NOT working.  Here's my code blowing up:</p>
  
  <pre><code>Linux $ ./myCode.py
  Traceback (most recent call last):
    File "./myCode.py", line 4, in &lt;module&gt;
      from pexpect import pxssh
  ImportError: cannot import name pxssh
  Linux $
  </code></pre>
  
  <p>The code is this:</p>
  
  <pre><code>#!/usr/bin/python
  
  import sys, time, datetime, logging
  from pexpect import pxssh
  
  ...
  s = pxssh.pxssh()
  s = pxssh.pxssh(options={"StrictHostKeyChecking": "no", "UserKnownHostsFile": "/dev/null"})
  ...more stuff...
  </code></pre>
  
  <p>So I believe I'm including the pxssh library correctly and I'm invoking the class correctly in my code.  The problem is that although pexpect is installed on my system, pxssh isn't available.  I can't figure out why.</p>
  
  <p>When I search my system, I see a "pxssh.py" file in the pexpect directory:</p>
  
  <pre><code>Linux $ pwd
  /home/me/project1/lib/python3.6/site-packages/pexpect-4.6.0-py3.6.egg/pexpect
  Linux $
  Linux $ ls -l
  total 200
  -rw-r--r--. 1 ph9821 domain users 12177 Sep 21 15:58 ANSI.py
  -rw-r--r--. 1 ph9821 domain users  2685 Sep 21 15:58 _async.py
  -rw-rw-r--. 1 ph9821 domain users   380 Sep 21 15:58 bashrc.sh
  -rw-r--r--. 1 ph9821 domain users  1068 Sep 21 15:58 exceptions.py
  -rw-r--r--. 1 ph9821 domain users 11035 Sep 21 15:58 expect.py
  -rw-r--r--. 1 ph9821 domain users  5828 Sep 21 15:58 fdpexpect.py
  -rw-r--r--. 1 ph9821 domain users 13419 Sep 21 15:58 FSM.py
  -rw-r--r--. 1 ph9821 domain users  3902 Sep 21 15:58 __init__.py
  -rw-r--r--. 1 ph9821 domain users  6161 Sep 21 15:58 popen_spawn.py
  -rw-r--r--. 1 ph9821 domain users 35855 Sep 21 15:58 pty_spawn.py
  -rw-r--r--. 1 ph9821 domain users 22589 Sep 21 15:58 pxssh.py        &lt;&lt;&lt;====
  drwxr-xr-x. 2 ph9821 domain users  4096 Sep 21 15:58 __pycache__
  -rw-r--r--. 1 ph9821 domain users  5170 Sep 21 15:58 replwrap.py
  -rw-r--r--. 1 ph9821 domain users  6632 Sep 21 15:58 run.py
  -rw-r--r--. 1 ph9821 domain users 13716 Sep 21 15:58 screen.py
  -rw-r--r--. 1 ph9821 domain users 21067 Sep 21 15:58 spawnbase.py
  -rw-r--r--. 1 ph9821 domain users  6019 Sep 21 15:58 utils.py
  
  Linux $
  </code></pre>
  
  <p>In the other post, they recommended checking to see if I needed an upgrade, but that didn't help:</p>
  
  <pre><code>Linux $ easy_install --upgrade pexpect
  Searching for pexpect
  Reading https://pypi.python.org/simple/pexpect/
  Best match: pexpect 4.6.0
  Processing pexpect-4.6.0-py3.6.egg
  pexpect 4.6.0 is already the active version in easy-install.pth
  
  Using /home/me/project1/lib/python3.6/site-packages/pexpect-4.6.0-py3.6.egg
  Processing dependencies for pexpect
  Finished processing dependencies for pexpect
  Linux $
  </code></pre>
  
  <p>So...  I'm on a compatible version of Python, with the latest pexpect installed and working, and pxssh.py is in the right place.  And yet, the code doesn't know how to use pxssh.</p>
  
  <p>I should also say that pxssh has <strong><em>never</em></strong> worked on this machine.  Is there something I have to do to kick pxssh after pexpect is installed?</p>
  
  <p>Could this be some kind of version compatibility issue between Python 2.7.5 and pexpect 4.6.0?  I note that there is a reference to Python 3.6 in my pexpect installation path...</p>
  
  <p>ADDENDUM:</p>
  
  <p>I also note that when I change the code to this:</p>
  
  <pre><code>#!/usr/bin/python
  
  import sys, time, datetime, logging, pexpect
  from pexpect import *
  ...
  s = pexpect.pxssh()
  s = pexpect.pxssh(options={"StrictHostKeyChecking": "no", "UserKnownHostsFile": "/dev/null"})
  ...
  </code></pre>
  
  <p>That the error message changes to this:</p>
  
  <pre><code>Linux $ ./myCode
  Traceback (most recent call last):
    File "./myCode.py", line 188, in &lt;module&gt;
      s = pexpect.pxssh()
  AttributeError: 'module' object has no attribute 'pxssh'
  Linux $
  </code></pre>
  
  <p>So the code can use pexpect but not pxssh.  Which means pxssh isn't installed???  Really confused...</p>