help on freefall please? virtualenv + django? sqlite doesn't work?

Alfred Perlstein bright at mu.org
Mon Sep 29 04:13:10 UTC 2014


OK, I sort of get it but...

This had to happen:
env CFLAGS=-I/usr/local/include pip install pysqlite

That is not intuitive, why do users need to do this on FreeBSD?  No 
other platform requires this.

I thought this was fixed a while back, is this still a problem on 
mainstream FreeBSD?

-Alfred

On 9/28/14, 9:08 PM, Alfred Perlstein wrote:
> I don't get it, why is there no sqlite?
>
> Is this just "freefall" that is broken... or is it FreeBSD in general 
> that you can't virtualenv+django with?  halp!!
>
> (github2bugzilla).(04:01:24)(alfred at freefall.freebsd.org)
> ~/github2bugzilla/ghb % python manage.py
> Traceback (most recent call last):
>   File "manage.py", line 10, in <module>
>     execute_from_command_line(sys.argv)
>   File 
> "/home/alfred/github2bugzilla/lib/python2.7/site-packages/django/core/management/__init__.py", 
> line 385, in execute_from_command_line
>     utility.execute()
>   File 
> "/home/alfred/github2bugzilla/lib/python2.7/site-packages/django/core/management/__init__.py", 
> line 354, in execute
>     django.setup()
>   File 
> "/home/alfred/github2bugzilla/lib/python2.7/site-packages/django/__init__.py", 
> line 21, in setup
>     apps.populate(settings.INSTALLED_APPS)
>   File 
> "/home/alfred/github2bugzilla/lib/python2.7/site-packages/django/apps/registry.py", 
> line 108, in populate
>     app_config.import_models(all_models)
>   File 
> "/home/alfred/github2bugzilla/lib/python2.7/site-packages/django/apps/config.py", 
> line 197, in import_models
>     self.models_module = import_module(models_module_name)
>   File "/usr/local/lib/python2.7/importlib/__init__.py", line 37, in 
> import_module
>     __import__(name)
>   File 
> "/home/alfred/github2bugzilla/lib/python2.7/site-packages/django/contrib/auth/models.py", 
> line 40, in <module>
>     class Permission(models.Model):
>   File 
> "/home/alfred/github2bugzilla/lib/python2.7/site-packages/django/db/models/base.py", 
> line 125, in __new__
>     new_class.add_to_class('_meta', Options(meta, **kwargs))
>   File 
> "/home/alfred/github2bugzilla/lib/python2.7/site-packages/django/db/models/base.py", 
> line 300, in add_to_class
>     value.contribute_to_class(cls, name)
>   File 
> "/home/alfred/github2bugzilla/lib/python2.7/site-packages/django/db/models/options.py", 
> line 166, in contribute_to_class
>     self.db_table = truncate_name(self.db_table, 
> connection.ops.max_name_length())
>   File 
> "/home/alfred/github2bugzilla/lib/python2.7/site-packages/django/db/__init__.py", 
> line 40, in __getattr__
>     return getattr(connections[DEFAULT_DB_ALIAS], item)
>   File 
> "/home/alfred/github2bugzilla/lib/python2.7/site-packages/django/db/utils.py", 
> line 242, in __getitem__
>     backend = load_backend(db['ENGINE'])
>   File 
> "/home/alfred/github2bugzilla/lib/python2.7/site-packages/django/db/utils.py", 
> line 108, in load_backend
>     return import_module('%s.base' % backend_name)
>   File "/usr/local/lib/python2.7/importlib/__init__.py", line 37, in 
> import_module
>     __import__(name)
>   File 
> "/home/alfred/github2bugzilla/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", 
> line 38, in <module>
>     raise ImproperlyConfigured("Error loading either pysqlite2 or 
> sqlite3 modules (tried in that order): %s" % exc)
> django.core.exceptions.ImproperlyConfigured: Error loading either 
> pysqlite2 or sqlite3 modules (tried in that order): No module named 
> _sqlite3
> (github2bugzilla).(04:01:39)(alfred at freefall.freebsd.org)
> ~/github2bugzilla/ghb % uname -a
> FreeBSD freefall.freebsd.org 11.0-CURRENT FreeBSD 11.0-CURRENT #0 
> r271252: Mon Sep  8 10:09:16 UTC 2014 
> peter at build-11.freebsd.org:/usr/obj/usr/src/sys/CLUSTER11  amd64
> (github2bugzilla).(04:01:43)(alfred at freefall.freebsd.org)
> ~/github2bugzilla/ghb % pip install pysqlite2
> Downloading/unpacking pysqlite2
>   Could not find any downloads that satisfy the requirement pysqlite2
> Cleaning up...
> No distributions at all found for pysqlite2
> Storing debug log for failure in /home/alfred/.pip/pip.log
> (github2bugzilla).(04:02:07)(alfred at freefall.freebsd.org)
> ~/github2bugzilla/ghb % pip install sqlite3
> Downloading/unpacking sqlite3
>   Could not find any downloads that satisfy the requirement sqlite3
> Cleaning up...
> No distributions at all found for sqlite3
> Storing debug log for failure in /home/alfred/.pip/pip.log
> (github2bugzilla).(04:02:28)(alfred at freefall.freebsd.org)
> ~/github2bugzilla/ghb %
>



More information about the freebsd-python mailing list