Bug 230613 - lang/python36: All python packages fail to run the internal sqlite3 module: ImportError: No module named '_sqlite3'
Summary: lang/python36: All python packages fail to run the internal sqlite3 module: I...
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-python (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-14 00:48 UTC by Yuri Victorovich
Modified: 2020-02-18 14:46 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (python)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2018-08-14 00:48:55 UTC
Pythin docs say that sqlite3 is included since python-2.5: https://docs.python.org/2/library/sqlite3.html

But 'import sqlite3' it fails:

> $ python3.5 sq.py
> Traceback (most recent call last):
>   File "sq.py", line 1, in <module>
>     import sqlite3
>   File "/usr/local/lib/python3.5/sqlite3/__init__.py", line 23, in <module>
>     from sqlite3.dbapi2 import *
>   File "/usr/local/lib/python3.5/sqlite3/dbapi2.py", line 27, in <module>
>     from _sqlite3 import *
> ImportError: No module named '_sqlite3'

Verified in 2.7, 3.5, 3.6.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2018-08-14 01:33:42 UTC
The sqlite (like the gdbm, bsddb and tkinter modules) that depend on external/third-party libraries are separated into their own ports. lang/python* ports include a pkg-message to this effect, including instructions on how/where to get them.

-------------
Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:

bsddb           databases/py-bsddb
gdbm            databases/py-gdbm
sqlite3         databases/py-sqlite3
tkinter         x11-toolkits/py-tkinter
-------------