Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (1)
avatar
Guru

When using a postgresql DB for Hue, you might have encoutered

[root@hue ~]# cd /usr/lib/hue 
[root@hue hue]# source ./build/env/bin/activate 
(env)[root@hue hue]# hue syncdb
Traceback (most recent call last):
  File "/usr/lib/hue/build/env/bin/hue", line 9, in <module>
    load_entry_point('desktop==2.6.1', 'console_scripts', 'hue')()
  File "/usr/lib/hue/desktop/core/src/desktop/manage_entry.py", line 60, in entry
    execute_manager(settings)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/core/management/__init__.py", line 261, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/core/management/__init__.py", line 67, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/South-0.8.2-py2.6.egg/south/management/commands/__init__.py", line 10, in <module>
    import django.template.loaders.app_directories
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/template/loaders/app_directories.py", line 21, in <module>
    mod = import_module(app)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/contrib/admin/__init__.py", line 1, in <module>
    from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/contrib/admin/helpers.py", line 1, in <module>
    from django import forms
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/forms/__init__.py", line 17, in <module>
    from models import *
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/forms/models.py", line 6, in <module>
    from django.db import connections
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/db/__init__.py", line 77, in <module>
    connection = connections[DEFAULT_DB_ALIAS]
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/db/utils.py", line 91, in __getitem__
    backend = load_backend(db['ENGINE'])
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/db/utils.py", line 32, in load_backend
    return import_module('.base', backend_name)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/db/backends/postgresql_psycopg2/base.py", line 24, in <module>
    raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named psycopg2

Download the psycopg2 module https://pypi.python.org/packages/source/p/psycopg2/psycopg2-2.6.1.tar.gz#md5=842b44f8c95517ed5b79208...

Then install it with easy_install

(env)[root@hue hue]# easy_install /root/psycopg2-2.6.1.tar.gz
Processing psycopg2-2.6.1.tar.gz
Running psycopg2-2.6.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-IDKkmV/psycopg2-2.6.1/egg-dist-tmp-CR0nZv
zip_safe flag not set; analyzing archive contents...
psycopg2.tests.test_types_basic: module references __file__
psycopg2.tests.test_module: module references __file__
Adding psycopg2 2.6.1 to easy-install.pth file

Installed /usr/lib/hue/build/env/lib/python2.6/site-packages/psycopg2-2.6.1-py2.6-linux-x86_64.egg
Processing dependencies for psycopg2==2.6.1
Finished processing dependencies for psycopg2==2.6.1


done ! (You might however consider Ambari views)

2,812 Views
Version history
Last update:
‎04-21-2026 06:50 AM
Updated by: