From owner-freebsd-questions@FreeBSD.ORG Sat Mar 31 23:04:09 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B546B106566B for ; Sat, 31 Mar 2012 23:04:09 +0000 (UTC) (envelope-from freebsd-questions@herveybayaustralia.com.au) Received: from mail.unitedinsong.com.au (mail.unitedinsong.com.au [150.101.178.33]) by mx1.freebsd.org (Postfix) with ESMTP id 629928FC15 for ; Sat, 31 Mar 2012 23:04:09 +0000 (UTC) Received: from laptop1.herveybayaustralia.com.au (laptop1.herveybayaustralia.com.au [192.168.0.182]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.unitedinsong.com.au (Postfix) with ESMTPSA id B22745C22 for ; Sun, 1 Apr 2012 09:17:43 +1000 (EST) Message-ID: <4F778D67.2060901@herveybayaustralia.com.au> Date: Sun, 01 Apr 2012 09:04:07 +1000 From: Da Rock User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111109 Thunderbird/7.0.1 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: Trouble installing py-sqlite3 port for python3.x X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Mar 2012 23:04:09 -0000 On 04/01/12 06:00, Modulok wrote: > List, > > I'm *guessing* this is more of FreeBSD problem than a python one, so I'll ask > on this list. I'm trying to import sqlite3 in python3.2 on FreeBSD > 8.1-RELEASE and ran > into trouble: > > $ python3.2 > ... > >>> import sqlite3 > Traceback (most recent call last): > File "", line 1, in > File "/usr/local/lib/python3.2/sqlite3/__init__.py", line 23, in > from sqlite3.dbapi2 import * > File "/usr/local/lib/python3.2/sqlite3/dbapi2.py", line 26, in > from _sqlite3 import * > ImportError: No module named _sqlite3 > > > I assumed I was missing some operating system dependent sqlite3 package. When I > attempt to install the 'ports/databases/py-sqlite3' port, it worked but it > installed it for python2.6. (Importing sqlite3 works in 2.6) There are no > config options for this port to select a python version. Similarly there's no > sqlite3 related config options for the python3.2 port. > > I then tried to use the python specific install tool, 'pip-3.2' to install the > python module: > > # pip-3.2 install pysqlite > > Unfortunately, it fails: > > Downloading/unpacking pysqlite > Real name of requirement pysqlite is pysqlite > Downloading pysqlite-2.6.3.tar.gz (74Kb): 74Kb downloaded > Running setup.py egg_info for package pysqlite > Traceback (most recent call last): > File "", line 14, in > File "/usr/local/lib/python3.2/codecs.py", line 300, in decode > (result, consumed) = self._buffer_decode(data, self.errors, final) > UnicodeDecodeError: 'utf8' codec can't decode byte 0xe4 in position 98: > invalid continuation byte > Complete output from command python setup.py egg_info: > Traceback (most recent call last): > > File "", line 14, in > > File "/usr/local/lib/python3.2/codecs.py", line 300, in decode > > (result, consumed) = self._buffer_decode(data, self.errors, final) > > UnicodeDecodeError: 'utf8' codec can't decode byte 0xe4 in position 98: > invalid continuation byte > > ---------------------------------------- > Command python setup.py egg_info failed with error code 1 > Storing complete log in /root/.pip/pip.log > > The complete log file doesn't reveal much else. My environment doesn't contain > any python env var. I don't have any python config files overriding install > locations or anything. My /etc/make.conf file contains no python variables. I > can display UTF-8 characters on the console just fine e.g: > > $ pytho3.2 > ... > >>> chr(0xe4) > 'ä' > > Suggestions, thoughts, ideas? Perhaps try ports@? But first try make build-depends-list to obtain more info, but it looks like it may not be supported.