擅长:python、mysql、java
<p>不需要向模块搜索路径添加任何内容;SQLite模块附带Python标准库。但是,您拼错了模块的名称,它被称为<a href="http://docs.python.org/2/library/sqlite3.html" rel="nofollow">^{<cd1>}</a>(注意末尾的<code>3</code>):</p>
<pre><code>Python 2.7.3 (default, Oct 22 2012, 06:12:32)
[GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.58)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> sqlite3.connect(':memory:')
<sqlite3.Connection object at 0x105354200>
</code></pre>
<p>如果仍然出现错误,则说明您的自制程序安装已中断;您可能遇到了<a href="https://github.com/mxcl/homebrew/issues/17312" rel="nofollow">this bug</a>。运行:</p>
^{pr2}$
<p>修理。在</p>