我尝试从 github 的源代码安装 django-utils 并使用 pip。安装顺利,但queue_command
在我的 django 应用程序中不起作用。
因此,按照文档中的建议,我尝试运行“python setup.py test”,但出现以下错误。我不知道如何解决这个问题。我在 mac snow leopard 上的 virtualenv 中运行。
有什么建议么?谢谢你。
running test
running egg_info
writing djutils.egg-info/PKG-INFO
writing top-level names to djutils.egg-info/top_level.txt
writing dependency_links to djutils.egg-info/dependency_links.txt
reading manifest file 'djutils.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'LICENSE.txt'
writing manifest file 'djutils.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
File "setup.py", line 33, in <module>
tests_require=['pygments', 'PIL>=0.1.5', 'httplib2'],
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "build/bdist.linux-i686/egg/setuptools/command/test.py", line 121, in run
File "build/bdist.linux-i686/egg/setuptools/command/test.py", line 101, in with_project_on_sys_path
File "build/bdist.linux-i686/egg/setuptools/command/test.py", line 130, in run_tests
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 94, in __init__
self.parseArgs(argv)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 149, in parseArgs
self.createTests()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 158, in createTests
self.module)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 128, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 91, in loadTestsFromName
module = __import__('.'.join(parts_copy))
File "/Users/miki725/Development/libs/django-utils/runtests.py", line 43, in <module>
from django.test.simple import run_tests
File "/Users/miki725/Development/Django/lib/python2.7/site-packages/django/test/__init__.py", line 5, in <module>
from django.test.client import Client, RequestFactory
File "/Users/miki725/Development/Django/lib/python2.7/site-packages/django/test/client.py", line 27, in <module>
from django.db import close_connection
File "/Users/miki725/Development/Django/lib/python2.7/site-packages/django/db/__init__.py", line 40, in <module>
backend = load_backend(connection.settings_dict['ENGINE'])
File "/Users/miki725/Development/Django/lib/python2.7/site-packages/django/db/__init__.py", line 34, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/Users/miki725/Development/Django/lib/python2.7/site-packages/django/db/utils.py", line 92, in __getitem__
backend = load_backend(db['ENGINE'])
File "/Users/miki725/Development/Django/lib/python2.7/site-packages/django/db/utils.py", line 51, in load_backend
raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: 'sqlite3' isn't an available database backend.
Try using django.db.backends.sqlite3 instead.
Error was: No module named base