title: ImportError: No module named pexpect
body: <p>I am using Fabric and would like to use fexpect. I have the following Python script:</p>
  
  <pre><code>from ilogue.fexpect import expect, expecting, run
  
  (...)
  
  def install_postgresql(profile):
  print("!!! Installing PostgreSQL...")
  print(' -&gt; Doing pre-cleanup...')
  
  # Remove PostgreSQL if it exists
  
  prompts = []
  prompts += expect('Do you want to continue [Y/n]? ', 'Y')
  
  with settings(warn_only=True):
      with expecting(prompts):
          run('sudo apt-get purge postgresql')
  
  print(' -&gt; Doing actual installation...')
  
  # Install PostgreSQL
  
  prompts = []
  prompts += expect('Do you want to continue [Y/n]? ', 'Y')
  
  with expecting(prompts):
      run('sudo apt-get install postgresql')
  
  # In some cases PostgreSQL has issues with Ubuntu's default kernel params
  # that prevent PostgreSQL to start automatically, so we try to start it
  # TODO: Fix it
  with settings(warn_only=True):
      run('sudo service postgresql start')
  </code></pre>
  
  <p>When executing I get the following error:</p>
  
  <pre><code>[xxx.xxx.xxx.xxx] out: Traceback (most recent call last):
  [xxx.xxx.xxx.xxx] out:   File "/tmp/fexpect_MbW3QP6Zpy5KBjBGQcaYxi", line 4, in &lt;module&gt;
  [xxx.xxx.xxx.xxx] out:     import pexpect
  [xxx.xxx.xxx.xxx] out: ImportError: No module named pexpect
  </code></pre>
  
  <p>I am using virtualenv and pexpect is actually installed:</p>
  
  <pre><code>(venv)PALM00545424A:woopup i841712$ pip install pexpect
  Requirement already satisfied (use --upgrade to upgrade): pexpect in ./venv/lib/python2.7/site-packages
  </code></pre>