Hue Installation Issue - Mac OS - python

I am trying to setup Hue on my Mac.
This is the GitHub link I referred to:
https://github.com/cloudera/hue#development-prerequisites
$ git clone https://github.com/cloudera/hue.git
$ cd hue
$ make apps
Getting this error:: when running build/env/bin/hue runserver
hue soundarya$ build/env/bin/hue runserver
Validating models...
Unhandled exception in thread started by <function wrapper at 0x108be1cf8>
Traceback (most recent call last):
File "/Users/soundarya/virtenv/hue_venv/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/utils/autoreload.py", line 93, in wrapper
fn(*args, **kwargs)
File "/Users/soundarya/virtenv/hue_venv/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/management/commands/runserver.py", line 102, in inner_run
self.validate(display_num_errors=True)
File "/Users/soundarya/virtenv/hue_venv/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/management/base.py", line 310, in validate
num_errors = get_validation_errors(s, app)
File "/Users/soundarya/virtenv/hue_venv/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/management/validation.py", line 34, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/Users/soundarya/virtenv/hue_venv/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/loading.py", line 196, in get_app_errors
self._populate()
File "/Users/soundarya/virtenv/hue_venv/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/loading.py", line 78, in _populate
self.load_app(app_name)
File "/Users/soundarya/virtenv/hue_venv/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/loading.py", line 99, in load_app
models = import_module('%s.models' % app_name)
File "/Users/soundarya/virtenv/hue_venv/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/Users/soundarya/virtenv/hue_venv/hue/apps/jobbrowser/src/jobbrowser/models.py", line 20, in <module>
import lxml.html
File "/Users/soundarya/virtenv/hue_venv/hue/build/env/lib/python2.7/site-packages/lxml-3.3.6-py2.7-macosx-10.11-intel.egg/lxml/html/__init__.py", line 42, in <module>
from lxml import etree
ImportError: dlopen(/Users/soundarya/virtenv/hue_venv/hue/build/env/lib/python2.7/site-packages/lxml-3.3.6-py2.7-macosx-10.11-intel.egg/lxml/etree.so, 2): Library not loaded: libxml2.2.dylib
Referenced from: /Users/soundarya/virtenv/hue_venv/hue/build/env/lib/python2.7/site-packages/lxml-3.3.6-py2.7-macosx-10.11-intel.egg/lxml/etree.so
Reason: Incompatible library version: etree.so requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0
Can anyone help me with this issue?

Prerequisites are not yet satisfied. You have to install all the requirements listed here: Development Prerequisites. To ged rid of this error, you have to install python2.7-dev package(not python2.7-devel) and also other requirements.

Related

ImportError: No module named social_django.middleware.in import_module __import__(name)

Hello I am trying to execute a project that is made in django 1.10.8 and pyhon 2.7 and the python_social_auth library. When I try to execute the project I get the following error.I hope you can help me
manage.py runserver
Unhandled exception in thread started by <function wrapper at 0x7f4b908eb488>
Traceback (most recent call last):
File "/home/mauricio/.local/lib/python2.7/site-packages/django/utils/autoreload.py", line 228, in wrapper
fn(*args, **kwargs)
File "/home/mauricio/.local/lib/python2.7/site-packages/channels/management/commands/runserver.py", line 39, in inner_run
http_consumer=self.get_consumer(*args, **options),
File "/home/mauricio/.local/lib/python2.7/site-packages/channels/management/commands/runserver.py", line 134, in get_consumer
return StaticFilesConsumer()
File "/home/mauricio/.local/lib/python2.7/site-packages/channels/handler.py", line 327, in __init__
self.handler = self.handler_class()
File "/home/mauricio/.local/lib/python2.7/site-packages/channels/staticfiles.py", line 18, in __init__
super(StaticFilesHandler, self).__init__()
File "/home/mauricio/.local/lib/python2.7/site-packages/channels/handler.py", line 177, in __init__
self.load_middleware()
File "/home/mauricio/.local/lib/python2.7/site-packages/django/core/handlers/base.py", line 80, in load_middleware
middleware = import_string(middleware_path)
File "/home/mauricio/.local/lib/python2.7/site-packages/django/utils/module_loading.py", line 20, in import_string
module = import_module(module_path)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named social_django.middleware
Try this
The Python executable you use to run the application doesn't have social_django installed. You can verify this by running these commands:
python manage.py shell
import social_django
This will give you an error, for the same reason.
You can install it with:
pip install social-auth-app-django

django-tracking not compatible with Django 1.6

I am trying to convert a Django 1.3 app to Django 1.6. I am using the django-tracking package but when I start the runsever I get the following error:
Unhandled exception in thread started by <function wrapper at 0x10868e9b0>
Traceback (most recent call last):
File "/Users/athom09/Projects/openemory1.6/openemoryEnv/lib/python2.7/site-packages/django/utils/autoreload.py", line 93, in wrapper
fn(*args, **kwargs)
File "/Users/athom09/Projects/openemory1.6/openemoryEnv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 101, in inner_run
self.validate(display_num_errors=True)
File "/Users/athom09/Projects/openemory1.6/openemoryEnv/lib/python2.7/site-packages/django/core/management/base.py", line 310, in validate
num_errors = get_validation_errors(s, app)
File "/Users/athom09/Projects/openemory1.6/openemoryEnv/lib/python2.7/site-packages/django/core/management/validation.py", line 34, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/Users/athom09/Projects/openemory1.6/openemoryEnv/lib/python2.7/site-packages/django/db/models/loading.py", line 196, in get_app_errors
self._populate()
File "/Users/athom09/Projects/openemory1.6/openemoryEnv/lib/python2.7/site-packages/django/db/models/loading.py", line 78, in _populate
self.load_app(app_name)
File "/Users/athom09/Projects/openemory1.6/openemoryEnv/lib/python2.7/site-packages/django/db/models/loading.py", line 99, in load_app
models = import_module('%s.models' % app_name)
File "/Users/athom09/Projects/openemory1.6/openemoryEnv/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/Users/athom09/Projects/openemory1.6/openemoryEnv/lib/python2.7/site-packages/tracking/models.py", line 5, in <module>
from django.contrib.gis.utils import HAS_GEOIP
ImportError: cannot import name HAS_GEOIP
The answer is here:
https://docs.djangoproject.com/en/1.4/ref/contrib/gis/geoip/#module-django.contrib.gis.geoip
In Django 1.6 the import needed has changed from:
from django.contrib.gis.utils import HAS_GEOIP
to:
from django.contrib.gis.geoip import HAS_GEOIP
You could try to install development version of django-tracking with
pip install git+https://github.com/bashu/django-tracking.git

ImportError: No module named pyorbited.simple while running django-orbited

I am trying to run test project of django-orbited. When I execute python manage.py runserver, the following error occurs:
Unhandled exception in thread started by <bound method Command.inner_run of
<django.core.management.commands.runserver.Command object at 0x8ea994c>>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 92, in inner_run
self.validate(display_num_errors=True)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 280, in validate
num_errors = get_validation_errors(s, app)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/validation.py", line 35, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 166, in get_app_errors
self._populate()
File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 75, in _populate
self.load_app(app_name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 96, in load_app
models = import_module('.models', app_name)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/home/prashant/grambox/django-orbited/testing/django_orbited/models.py", line 2, in <module>
from pyorbited.simple import Client as OrbitedClient
ImportError: No module named pyorbited.simple
I have installed orbited using command pip install orbited. I tried changing pyorbited.simple to orbited.simple, but the error persists. Does anyone have any idea how to solve it?
Value in sys.path:
/usr/local/lib/python2.7/dist-packages/pip-1.2.1-py2.7.egg
/usr/local/lib/python2.7/dist-packages/jqmobile-1.0_pre_alpha-py2.7.egg
/usr/lib/python2.7
/usr/lib/python2.7/plat-linux2
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/PIL
/usr/lib/python2.7/dist-packages/gst-0.10
/usr/lib/python2.7/dist-packages/gtk-2.0
/usr/lib/python2.7/dist-packages/ubuntu-sso-client
/usr/lib/python2.7/dist-packages/ubuntuone-client
/usr/lib/python2.7/dist-packages/ubuntuone-control-panel
/usr/lib/python2.7/dist-packages/ubuntuone-couch
/usr/lib/python2.7/dist-packages/ubuntuone-installer
/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol
/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode
You installed orbited but you need to install pyorbited.
I can reproduce the same issue with only orbited installed:
% sudo pip install orbited
% python
>>> import orbited # yes, this works but it's not what you need
>>> from pyorbited.simple import Client as OrbitedClient
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pyorbited.simple
On the other hand, once we install pyorbited, it works:
% sudo pip install pyorbited
% python
>>> from pyorbited.simple import Client as OrbitedClient
>>>

python manage.py runserver not working on Macbook 10.8

Running folllowing command
$python2.6 manage.py runserver
Gives this an ouput:
Traceback (most recent call last):
File "manage.py", line 8, in <module>
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management
I tried many solutions out there but they are of no use.
When I try to install django again it using pip,
$ pip install django
It give following output:
Requirement already satisfied (use --upgrade to upgrade): django in /Library/Python/2.7/site-packages
Cleaning up...
And trying
$ pip freeze
Gives following output,
Django==1.5.4
MySQL-python==1.2.4
...
...
...
wsgiref==0.1.2
xattr==0.6.2
zope.interface==3.5.1
I dont know what to do? Please help I wasted the whole trying to run this successfully. Thanks.
UPDATE:
When I tried running
$ python2.7 manage.py runserver
it gives me following error
Validating models...
Unhandled exception in thread started by <bound method Command.inner_run of <django.contrib.staticfiles.management.commands.runserver.Command object at 0x107e63050>>
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/django/core/management/commands/runserver.py", line 92, in inner_run
self.validate(display_num_errors=True)
File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 280, in validate
num_errors = get_validation_errors(s, app)
File "/Library/Python/2.7/site-packages/django/core/management/validation.py", line 28, in get_validation_errors
from django.db import models, connection
File "/Library/Python/2.7/site-packages/django/db/__init__.py", line 40, in <module>
backend = load_backend(connection.settings_dict['ENGINE'])
File "/Library/Python/2.7/site-packages/django/db/__init__.py", line 34, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/Library/Python/2.7/site-packages/django/db/utils.py", line 93, in __getitem__
backend = load_backend(db['ENGINE'])
File "/Library/Python/2.7/site-packages/django/db/utils.py", line 27, in load_backend
return import_module('.base', backend_name)
File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/Library/Python/2.7/site-packages/django/db/backends/mysql/base.py", line 17, in <module>
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Users/tg/.python-eggs/MySQL_python-1.2.4-py2.7-macosx-10.8-intel.egg-tmp/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib
Referenced from: /Users/tg/.python-eggs/MySQL_python-1.2.4-py2.7-macosx-10.8-intel.egg-tmp/_mysql.so
Reason: image not found

python manage.py sql is throwing a no suitable image found exception

I have macbook pro running OS X 10.7 on Intel processor. I have installed Django 1.3.1, MySQL-python 1.2.3. All the packages installed fine. When I execute command "python manage.py sql poll", I'm running into the following exception.
Traceback (most recent call last):
File "manage.py", line 14, in <module>
execute_manager(settings)
File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 67, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/Library/Python/2.7/site-packages/django/core/management/commands/sql.py", line 4, in <module>
from django.core.management.sql import sql_create
File "/Library/Python/2.7/site-packages/django/core/management/sql.py", line 6, in <module>
from django.db import models
File "/Library/Python/2.7/site-packages/django/db/__init__.py", line 78, in <module>
connection = connections[DEFAULT_DB_ALIAS]
File "/Library/Python/2.7/site-packages/django/db/utils.py", line 93, in __getitem__
backend = load_backend(db['ENGINE'])
File "/Library/Python/2.7/site-packages/django/db/utils.py", line 33, in load_backend
return import_module('.base', backend_name)
File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/Library/Python/2.7/site-packages/django/db/backends/mysql/base.py", line 14, in <module>
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Users/khoa/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so, 2): no suitable image found. Did find:
/Users/khoa/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so: mach-o, but wrong architecture
Chances are that the Python you are using (the Apple-supplied Python 2.7.1, perhaps) is running in 64-bit mode but the MySQLdb extension module that you've installed is 32-bit only. Or, possibly, the reverse. The output of this shell command should tell you what architectures the extension module was compiled for:
file /Users/khoa/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so
The MySQLdb extension module and the MySQL client libraries you've installed must have a common architecture with the architecture that the Python instance you are using.

Categories