Python3, ImportError: No module named '_sqlite3'

Craig Rodrigues rodrigc at crodrigues.org
Sat Nov 14 15:56:45 UTC 2015


On Sat, Nov 14, 2015 at 7:28 AM, Volodymyr Kostyrko <arcade at b1t.name> wrote:

> On 14.11.2015 17:18, Craig Rodrigues wrote:
>
>> Hi,
>>
>> I did the following on a FreeBSD 10.2 system:
>>
>> pkg install lang/python35
>>
>> python3.5 -c "import sqlite3"
>>
>
> sqlite3 is not part of the "python" package, you can install it from port:
> databases/py-sqlite3. As there's no specific python3 versions of that ports
> you need to set PYTHON_VERSION=python3.5 before building. Both 2.x and 3.x
> versions of package can coexist peacefully.



Hi,

Antoine showed me how to fix it:

make -C /usr/ports/databases/py-sqlite3 PYTHON_VERSION=3.5 install

Thanks!
--
Craig


More information about the freebsd-python mailing list