0

我正在尝试使用位于此处的第三方应用程序:

git://github.com/Star2Billing/django-audiofield.git

我使用 Aptana Studio 作为我的 IDE。我创建了我的项目,然后单击该项目并从 github 位置导入了该应用程序。好像是进口的。我想在开始任何真正的编码之前检查它是否正确导入,所以我执行了manage.py validate.

我收到一条消息,上面写着:"No module named audiofield"。我将该应用程序添加到我的已安装应用程序设置中,并按照安装说明进行操作。

我不确定我是否错误地导入了它。另外,我virtualenv在 Aptana 中使用。我不确定这是否会增加问题。

请帮忙。

更新:谢谢 dm0351。我按照你的建议做了。但是,我得到以下信息:

Traceback (most recent call last):
 File "/Users/home/Desktop/Web Development/Aptana Studio 3.0/musicproject/src/manage.py",    line 10, in <module>
execute_from_command_line(sys.argv)
 File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
utility.execute()
 File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(*args, **options)
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle
return self.handle_noargs(**options)
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/core/management/commands/validate.py", line 9, in handle_noargs
self.validate(display_num_errors=True)
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/core/management/base.py", line 266, in validate
num_errors = get_validation_errors(s, app)
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/core/management/validation.py", line 30, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/db/models/loading.py", line 158, in get_app_errors
self._populate()
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/db/models/loading.py", line 67, in _populate
self.load_app(app_name)
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/db/models/loading.py", line 88, in load_app
models = import_module('.models', app_name)
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/Users/home/virtualenv/venv/src/audiofield/audiofield/models.py", line 19, in <module>
from audiofield.fields import AudioField
File "/Users/home/virtualenv/venv/src/audiofield/audiofield/fields.py", line 20, in <module>
from tasks import audio_convert_task
File "/Users/home/virtualenv/venv/src/audiofield/audiofield/tasks.py", line 14, in <module>
from celery.task import Task
ImportError: No module named celery.task
Finished "/Users/home/Desktop/Web Development/Aptana Studio 3.0/musicproject/src/manage.py  validate" execution.
4

1 回答 1

1

我相信您可以使用以下方法安装到您的虚拟环境中:

pip install -e URI#egg=EggName
pip install -e git+git://github.com/Star2Billing/django-audiofield.git#egg=audiofield
于 2012-10-13T03:21:27.190 回答