DJANGO_PATH错误和设置问题

时间:2014-08-18 08:27:36

标签: django settings sys

我最近将我的Ubuntu升级到14.04,并咨询了这个问题来解决我的错误,ImportError: No module named _io in ubuntu 14.04。这完全解决了。

我也检查了这个问题,因为它类似于我的Consistently getting ImportError: Could not import settings 'myapp.settings' error,但无法使用相同的解决方案。

我没有在我的项目中使用manage.py而且我已经完成了很多PYTHON_PATH的导出工作。这是我的追溯;

Traceback (most recent call last):
File "/home/thabang/.virtualenvs/lottostar/bin/django-admin.py", line 5, in <module>
management.execute_from_command_line()
File "/home/thabang/.virtualenvs/lottostar/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/home/thabang/.virtualenvs/lottostar/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/thabang/.virtualenvs/lottostar/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
commands = get_commands()
File "/home/thabang/.virtualenvs/lottostar/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 107, in get_commands
apps = settings.INSTALLED_APPS
File "/home/thabang/.virtualenvs/lottostar/local/lib/python2.7/site-packages/django/conf/__init__.py", line 54, in __getattr__
self._setup(name)
File "/home/thabang/.virtualenvs/lottostar/local/lib/python2.7/site-packages/django/conf/__init__.py", line 49, in _setup
self._wrapped = Settings(settings_module)
File "/home/thabang/.virtualenvs/lottostar/local/lib/python2.7/site-packages/django/conf/__init__.py", line 132, in __init__
% (self.SETTINGS_MODULE, e)
ImportError: Could not import settings 'lottostar.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named lottostar.settings

1 个答案:

答案 0 :(得分:0)

我发现了问题:

在virtualenv重新安装期间,egg文件存在问题。虽然这些节目在那里,却找不到它们。我刚刚执行了另一个安装要求来刷新鸡蛋信息。