Python3, ImportError: No module named '_sqlite3'
Craig Rodrigues
rodrigc at FreeBSD.org
Sat Nov 14 15:18:48 UTC 2015
Hi,
I did the following on a FreeBSD 10.2 system:
pkg install lang/python35
python3.5 -c "import sqlite3"
and got this error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named 'sqlite'
[rodrigc at rodrigc-laptop1 portingdb]% python3.5 -c "import sqlite3"
Traceback (most recent call last):
File "<string>", line 1, in <module>
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'
For python2.7, I notice that this error is not there, because
the databases/py-sqlite3 port provides
/usr/local/lib/python2.7/lib-dynload/_sqlite3.so .
What is the workaround for Python 3.5?
Thanks.
--
Craig
More information about the freebsd-python
mailing list