title: pyinstaller: _libcouchbase module not found after building the executable
body: <p>I have a simple python script that imports couchbase module on Ubuntu 14.04:   </p>
  
  <pre><code>$ cat test.py
  from couchbase import Couchbase
  
  print 'module _libcouchbase found'
  </code></pre>
  
  <p>Running from interpreter works fine:</p>
  
  <pre><code>$ python test.py
  module _libcouchbase found
  </code></pre>
  
  <p>Created an executable:</p>
  
  <pre><code>$ pyinstaller test.py
  </code></pre>
  
  <p>Running the executable throws an error of unable to import _libcouchbase module:</p>
  
  <pre><code>$ ./dist/test/test
  Traceback (most recent call last):
    File "&lt;string&gt;", line 1, in &lt;module&gt;
    File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
      exec(bytecode, module.__dict__)
    File "/home/subba/cb/build/cb/out00-PYZ.pyz/mycouch", line 28, in &lt;module&gt;
    File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
      exec(bytecode, module.__dict__)
    File "/home/subba/cb/build/cb/out00-PYZ.pyz/couchbase", line 28, in &lt;module&gt;
    File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
      exec(bytecode, module.__dict__)
    File "/home/subba/cb/build/cb/out00-PYZ.pyz/couchbase.user_constants", line 21, in &lt;module&gt;
    File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
      exec(bytecode, module.__dict__)
    File "/home/subba/cb/build/cb/out00-PYZ.pyz/couchbase._bootstrap", line 34, in &lt;module&gt;
    File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
      exec(bytecode, module.__dict__)
    File "/home/subba/cb/build/cb/out00-PYZ.pyz/couchbase.exceptions", line 18, in &lt;module&gt;
  ImportError: No module named _libcouchbase
  </code></pre>
  
  <p>It seems very mysterious. Thanks for any thoughts on why this happens!</p>