title: Pexpect Methods Not Working
body: <p>I am running CentOS7 and have installed pexpect in Python3.5. However, when I call any of the methods it is returning an error stating the attribute does not exist.  Any ideas why this is occurring? I read that it could be due to a file name pexpect.py in the directory but I do NOT have a file called pexpect.py in the same directory. </p>
  
  <pre><code>$ pip3.5 freeze | grep pexpect
  pexpect==4.2.1
  </code></pre>
  
  <p>Example Code:</p>
  
  <pre><code># This connects to the openbsd ftp site and
  # downloads the recursive directory listing.
  import pexpect
  child = pexpect.spawn('ftp ftp.openbsd.org')
  child.expect('Name .*: ')
  child.sendline('anonymous')
  child.expect('Password:')
  child.sendline('noah@example.com')
  child.expect('ftp&gt; ')
  child.sendline('lcd /tmp')
  child.expect('ftp&gt; ')
  child.sendline('cd pub/OpenBSD')
  child.expect('ftp&gt; ')
  child.sendline('get README')
  child.expect('ftp&gt; ')
  child.sendline('bye')
  </code></pre>
  
  <p>Error:</p>
  
  <p>CentOS7 Virtual Machine Error:</p>
  
  <pre><code>/usr/local/bin/python3.5 /media/sf_PycharmProjects/MyPyScripts/Tutorials/input_cmds
  Traceback (most recent call last):
    File "/media/sf_PycharmProjects/MyPyScripts/Tutorials/input_cmds", line 4, in &lt;module&gt;
      child = pexpect.spawn('ftp ftp.openbsd.org')
  AttributeError: module 'pexpect' has no attribute 'spawn'
  </code></pre>
  
  <p>Windows Error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/home/PycharmProjects/PyCAT/Current_Version/SFTP/testsftp.py", line 4, in &lt;module&gt;
      child = pexpect.spawn('ftp ftp.openbsd.org')
  AttributeError: module 'pexpect' has no attribute 'spawn'
  </code></pre>
  
  <p>Pexpect Dir:</p>
  
  <pre><code>&gt;&gt;&gt; import pexpect
  &gt;&gt;&gt; dir(pexpect)
  ['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__']
  </code></pre>