我正在尝试构建openstack(stack.sh),尝试了很多次,仍然无法弄清楚原因,下面是日志:
2016-09-08 05:36:48.424 | Warning: Could not import Horizon dependencies. This is normal during installation.
2016-09-08 05:36:48.425 | WARNING:root:No local_settings file found.
2016-09-08 05:36:48.426 | Traceback (most recent call last):
2016-09-08 05:36:48.426 | File "/opt/stack/horizon/manage.py", line 23, in <module>
2016-09-08 05:36:48.426 | execute_from_command_line(sys.argv)
2016-09-08 05:36:48.426 | File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
2016-09-08 05:36:48.426 | utility.execute()
2016-09-08 05:36:48.426 | File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 345, in execute
2016-09-08 05:36:48.426 | settings.INSTALLED_APPS
2016-09-08 05:36:48.426 | File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 46, in __getattr__
2016-09-08 05:36:48.426 | self._setup(name)
2016-09-08 05:36:48.426 | File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 42, in _setup
2016-09-08 05:36:48.426 | self._wrapped = Settings(settings_module)
2016-09-08 05:36:48.426 | File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 98, in __init__
2016-09-08 05:36:48.426 | % (self.SETTINGS_MODULE, e)
2016-09-08 05:36:48.426 | ImportError: Could not import settings 'openstack_dashboard.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named angular_fileupload
2016-09-08 05:36:48.450 | + exit_trap
答案 0 :(得分:1)
首先,您需要确保已安装pip
,如果您使用Ubuntu sudo apt-get install python-pip -y
进行了自举,其中-y标志只是接受任何包并准备安装
如果您使用的是CentOS或任何其他基于Redhat的系统yum install -y python-pip
完成此操作后,您需要转到cd horizon/
,其中horizon是您刚刚使用git下载的文件夹。
应该是这样的:
fueladmin@nodename:~/horizon$ ls
AUTHORS LICENSE run_tests.sh
babel-django.cfg Makefile setup.cfg
babel-djangojs.cfg manage.py setup.py
build MANIFEST.in static
ChangeLog node_modules test-requirements.txt
CONTRIBUTING.rst openstack_dashboard test-shim.js
doc package.json tools
HACKING.rst README.rst tox.ini
horizon releasenotes
horizon.egg-info requirements.txt
如果您熟悉节点包管理,作曲家或ruby gems,您很快就会明白requirements.txt是python等同于package.json或composer.json之类的东西,即它所有的需要安装的软件包位于。
在地平线/文件夹中运行此命令pip install -r requirements.txt
,它应该安装。您可能需要将其作为sudo运行。
完成此操作后,您可以继续,启动服务器,配置等。