From owner-freebsd-python@freebsd.org Sat Nov 14 15:18:48 2015 Return-Path: Delivered-To: freebsd-python@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BBBEA2F71C for ; Sat, 14 Nov 2015 15:18:48 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-yk0-x22e.google.com (mail-yk0-x22e.google.com [IPv6:2607:f8b0:4002:c07::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E24C18FB for ; Sat, 14 Nov 2015 15:18:48 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: by ykfs79 with SMTP id s79so187348439ykf.1 for ; Sat, 14 Nov 2015 07:18:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=ajp+Ub1xji9ZzbmbrqVacRn476dalhy4KRdZMrOcYiw=; b=cBymgbfM2dACmv+taCrSvEZN94jIKOAIQRHY/xnCRKVqoTiPCdNUklLRH/L/4+Fteh 9onsgHIT0djbdP4r83DbOgDBDOVGiKkxao+h3DQhIBfEpGkiqNQAUyHBgGsWlbVs7X0x eEQomfkWYUq8F1CSMiYHxKE68+xIdcVR7D/OvfALrzYvpy7xcbZ+Z7C+LKWYb14jXbhb SXMTxM2JXvYZTkF25kbrKgP/Fk+zXeArnUNjcTQEAfMS80b1fcTDD3IOPV3XzgnDxYUd 3Nj6RgfclzxqoFij4+HS0lu2W0yJv13KpzgNX7a+T1KWOUJnxRbA5mvvnZf3YbXHhhvh 0f6A== MIME-Version: 1.0 X-Received: by 10.13.245.1 with SMTP id e1mr988892ywf.172.1447514327347; Sat, 14 Nov 2015 07:18:47 -0800 (PST) Sender: crodr001@gmail.com Received: by 10.37.95.9 with HTTP; Sat, 14 Nov 2015 07:18:47 -0800 (PST) Date: Sat, 14 Nov 2015 07:18:47 -0800 X-Google-Sender-Auth: UjrPhBpHR8cVKVcvW0RL_oFA2Hc Message-ID: Subject: Python3, ImportError: No module named '_sqlite3' From: Craig Rodrigues To: freebsd-python@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Nov 2015 15:18:48 -0000 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 "", line 1, in ImportError: No module named 'sqlite' [rodrigc@rodrigc-laptop1 portingdb]% python3.5 -c "import sqlite3" Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.5/sqlite3/__init__.py", line 23, in from sqlite3.dbapi2 import * File "/usr/local/lib/python3.5/sqlite3/dbapi2.py", line 27, in 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