title: pexpect AttributeError: 'module' object has no attribute 'spawn'
body: <p>What is wrong here?</p>
  
  <pre><code>$ python -V
  Python 2.7.5
  </code></pre>
  
  <p>I have installed <code>pip install pexcept</code> </p>
  
  <p>now when i load it </p>
  
  <pre><code>$ python
  Python 2.7.5 (default, Jul 13 2018, 13:06:57)
  [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import pexpect
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "pexpect.py", line 10, in &lt;module&gt;
      child = pexpect.spawn('ssh %s@%s' % (switch_un, switch_ip))
  AttributeError: 'module' object has no attribute 'spawn'
  &gt;&gt;&gt; 
  </code></pre>
  
  <h1>EDIT</h1>
  
  <p>Running Linux CentOS 7.x version (64bit)</p>