Ask Your Question
0

horizon project execution problem ( import settings )

asked 2013-11-20 14:44:40 -0500

gokhankcmn gravatar image

I download the horizon project from github and open it by using eclipse IDE as a django project. Then I run the project but got some errors like:

Warning: Could not import Horizon dependencies. This is normal during installation. Traceback (most recent call last): File "/home/gokhan/git/horizon/manage.py", line 11, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 399, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 261, in fetch_command commands = get_commands() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 107, in get_commands apps = settings.INSTALLED_APPS File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 54, in __getattr__ self._setup(name) File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 49, in _setup self._wrapped = Settings(settings_module) File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 132, in __init__ % (self.SETTINGS_MODULE, e) ImportError: Could not import settings 'horizon.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named settings

Any help?

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2013-11-25 19:45:49 -0500

You are going to need to install python-dev to get the header file Python.h

apt-get install python-dev

Hopefully that will get you further.

edit flag offensive delete link more
0

answered 2013-11-20 20:53:55 -0500

david-lyle gravatar image

I believe you are missing openstack_dashboard/local/local_settings.py. To start, you can copy the local_settings.py.example, but the Keystone endpoints will have to change. The setting is AVAILABLE_REGIONS.

edit flag offensive delete link more
0

answered 2013-11-21 06:40:56 -0500

gokhankcmn gravatar image

I have local_settings.py file now. But a different problem I have now:

Warning: Could not import Horizon dependencies. This is normal during installation. Traceback (most recent call last): File "/home/gokhan/git/horizon/manage.py", line 11, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 399, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 261, in fetch_command commands = get_commands() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 107, in get_commands apps = settings.INSTALLED_APPS File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 54, in __getattr__ self._setup(name) File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 49, in _setup self._wrapped = Settings(settings_module) File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 128, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module __import__(name) File "/home/gokhan/git/horizon/horizon/__init__.py", line 55, in <module> assert Dashboard NameError: name 'Dashboard' is not defined

edit flag offensive delete link more
0

answered 2013-11-21 08:27:33 -0500

gokhankcmn gravatar image

Hi,

I tried to find the main problem and carefully pursue the steps and found that problem is installing horizon dependencies. When I try to install dependencies by using command below:

python tools/install_venv.py

I got that:

In file included from greenlet.c:5:0:

greenlet.h:8:20: fatal error: Python.h: No such file or directory

compilation terminated.

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


Cleaning up... Command /home/gokhan/git/horizon/.venv/bin/python -c "import setuptools;__file__='/home/gokhan/git/horizon/.venv/build/greenlet/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-AekllV-record/install-record.txt --single-version-externally-managed --install-headers /home/gokhan/git/horizon/.venv/include/site/python2.7 failed with error code 1 in /home/gokhan/git/horizon/.venv/build/greenlet Traceback (most recent call last): File "/home/gokhan/git/horizon/.venv/bin/pip", line 9, in <module> load_entry_point('pip==1.4.1', 'console_scripts', 'pip')() File "/home/gokhan/git/horizon/.venv/local/lib/python2.7/site-packages/pip/__init__.py", line 148, in main return command.main(args[1:], options) File "/home/gokhan/git/horizon/.venv/local/lib/python2.7/site-packages/pip/basecommand.py", line 169, in main text = '\n'.join(complete_log) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 66: ordinal not in range(128) Command "tools/with_venv.sh pip install --upgrade -r /home/gokhan/git/horizon/requirements.txt" failed.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-11-20 14:44:40 -0500

Seen: 325 times

Last updated: Nov 25 '13