title: Shared library _sqlite3.so not found when importing sqlite3 on Python 2.6.6
body: <p>Okay i've been battling for this for 2 days, that usually means its something too simple to realize.</p>
  
  <p>I have an embedded linux system which I cross compile on my ubuntu. When compiling python, sqlite3 is not on the list of modules that have not been able to be compiled.</p>
  
  <p>But, the _sqlite3.so library is not in the same location as for example json.so and ctypes.so array.so...
  in Python-2.6.6/build/lib.linux868-2.6/</p>
  
  <p>The actual module with the init-functions etc is in the right place at :
  in Python-2.6.6/modules and it can also be found on the target system.</p>
  
  <p>Since the so-file was missing, i tried compiling it myself as a shared library using my arm-compiler. This did not work either.</p>
  
  <p>Without manually compiled so-file:</p>
  
  <pre><code>&gt;&gt;&gt; import sqlite3
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "rootfs/python/lib/python2.6/sqlite3/__init__.py", line 24, in &lt;module&gt;
    File "rootfs/python/lib/python2.6/sqlite3/dbapi2.py", line 27, in &lt;module&gt;
  ImportError: /python/lib/python2.6/lib-dynload/_sqlite3.so: cannot open shared object file: No such file or directory
  </code></pre>
  
  <p>With the compiled shared library found at lib-dynloads:</p>
  
  <pre><code>&gt;&gt;&gt; import sqlite3
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "rootfs/python/lib/python2.6/sqlite3/__init__.py", line 24, in &lt;module&gt;
    File "rootfs/python/lib/python2.6/sqlite3/dbapi2.py", line 27, in &lt;module&gt;
  ImportError: dynamic module does not define init function (init_sqlite3)
  </code></pre>
  
  <p>Edit:
  I was wondering if i had compiled the right library for sqlite3. As far as i now understand the _sqlite3.so is something the python builder makes and libsqlite3.so is the library it needs to build it? And libsqlite3.so is build from Sqlite3-source code. Am i mistaken here?</p>
  
  <p>Anyone with more embedded Linux or Python experience have an idea what I am doing wrong here?</p>