Summary: | dev-python/django-1.2.3 - django.core.exceptions.ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): No module named sqlite3 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alex HeadHunter Pyattaev <alex.pyattaev> |
Component: | [OLD] Development | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED INVALID | ||
Severity: | minor | CC: | dev |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Alex HeadHunter Pyattaev
2010-11-24 13:40:56 UTC
The Django ebuild does pull pysqlite: sqlite? ( || ( dev-lang/python:2.7[sqlite] dev-lang/python:2.6[sqlite] dev-lang/python:2.5[sqlite] dev-python/pysqlite:2 ) ) but only if it isn't already included with your python install (Python 2.5 and up all include the sqlite3 module). I see you are using Python 2.6, so perhaps you should check if sqlite is set in your use flags? Install dev-python/django with USE="sqlite". (In reply to comment #2) > Install dev-python/django with USE="sqlite". > Thats what I did. What I mean is that it is not cool when you install a library in a broken way just because some use-flag is not set. It should not get Broken(TM). If it depends on sqlite - make it hard dep. If it does not - remove the module that uses it from install if sqlite is not in USE. That's it. And global sqlite is not a good option, as you might know. (In reply to comment #3) > (In reply to comment #2) > > Install dev-python/django with USE="sqlite". > > > > Thats what I did. What I mean is that it is not cool when you install a library > in a broken way just because some use-flag is not set. It should not get > Broken(TM). If it depends on sqlite - make it hard dep. If it does not - remove > the module that uses it from install if sqlite is not in USE. That's it. And > global sqlite is not a good option, as you might know. > So, django supports many different database engines and many of us do not want to install sqlite where we do not need it. That is the reason for the USE flag. This behavior is cool, and completely copesetic. In fact its part of what makes Gentoo so configurable. We do not have to install every DB under the sun to get our desired outcome, which is a functioning system. Further, removing the module that "uses" sqlite in django would be a burden not worth the time, and might require a serious hack job on the upstream package. We avoid this sort of poor practice in Gentoo as a general rule. Finally, using the system sqlite _is_ the desired behavior. Using bundled libs over system libs is considered bad practice in Gentoo, and for very good reasons. I'll refer you to this post [1] by one of our devs, but there are many other resources. Just search a bit and perhaps you will see the wisdom. I hope this helps you understand what is going on here, and why things are the way they are. Cheers. [1] http://blog.flameeyes.eu/2009/01/02/bundling-libraries-for-despair-and-insecurity |