Date: Sat, 31 Mar 2012 14:00:41 -0600 From: Modulok <modulok@gmail.com> To: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Trouble installing py-sqlite3 port for python3.x Message-ID: <CAN2%2BEpZuNBYsJf0a-aK22eo-6LRSjHm_81SPOr=aA5=BmAvS2w@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
List, I'm *guessing* this is more of FreeBSD problem than a python one, so I'll a= sk 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 "<stdin>", line 1, in <module> File "/usr/local/lib/python3.2/sqlite3/__init__.py", line 23, in <mod= ule> from sqlite3.dbapi2 import * File "/usr/local/lib/python3.2/sqlite3/dbapi2.py", line 26, in <modul= e> from _sqlite3 import * ImportError: No module named _sqlite3 I assumed I was missing some operating system dependent sqlite3 package. Wh= en 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 "<string>", line 14, in <module> File "/usr/local/lib/python3.2/codecs.py", line 300, in decode (result, consumed) =3D self._buffer_decode(data, self.errors, f= inal) 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 "<string>", line 14, in <module> File "/usr/local/lib/python3.2/codecs.py", line 300, in decode (result, consumed) =3D 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 cont= ain 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) '=E4' Suggestions, thoughts, ideas? Thanks! -Modulok-
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN2%2BEpZuNBYsJf0a-aK22eo-6LRSjHm_81SPOr=aA5=BmAvS2w>