openstack-dashboard-ubuntu-theme Error while installing package - django

I'm trying implement elastic search in my Django application.
For that i need to install open JDK-7 in my ubuntu 16.04 system.
While installing i'm getting the following error.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libatk-wrapper-java libatk-wrapper-java-jni openjdk-7-jre
Suggested packages:
openjdk-7-demo openjdk-7-source visualvm icedtea-7-jre-jamvm sun-java6-fonts
fonts-ipafont-gothic fonts-ipafont-mincho fonts-indic
The following packages will be REMOVED:
openstack-dashboard-ubuntu-theme
The following NEW packages will be installed:
libatk-wrapper-java libatk-wrapper-java-jni openjdk-7-jdk openjdk-7-jre
openjdk-7-jre-headless
0 upgraded, 5 newly installed, 1 to remove and 28 not upgraded.
2 not fully installed or removed.
Need to get 0 B/55.9 MB of archives.
After this operation, 77.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 515256 files and directories currently installed.)
Removing openstack-dashboard-ubuntu-theme (2:9.1.0-0ubuntu1) ...
Collecting and compressing static assets...
Traceback (most recent call last):
File "manage.py", line 25, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 350, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 302, in execute
settings.INSTALLED_APPS
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 55, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 43, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 99, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/share/openstack-dashboard/openstack_dashboard/settings.py", line 381, in <module>
from openstack_auth import policy
File "/usr/lib/python2.7/dist-packages/openstack_auth/policy.py", line 24, in <module>
from openstack_auth import user as auth_user
File "/usr/lib/python2.7/dist-packages/openstack_auth/user.py", line 18, in <module>
from django.contrib.auth import models
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/models.py", line 4, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/base_user.py", line 49, in <module>
class AbstractBaseUser(models.Model):
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 94, in __new__
app_config = apps.get_containing_app_config(module)
File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 239, in get_containing_app_config
self.check_apps_ready()
File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 124, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
dpkg: error processing package openstack-dashboard-ubuntu-theme (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
openstack-dashboard-ubuntu-theme
E: Sub-process /usr/bin/dpkg returned an error code (1)
I also tried following commands to fix these issues.But it didn't worked
apt-get remove --auto-remove openstack-dashboard-ubuntu-theme
Thanks in advance

I was able to discern in my case it was an issue to do with apache not restarting due to a missing module namely : wsgi
I installed it :
apt-get install libapache2-mod-wsgi
The activated it :
sudo a2enmod wsgi
sudo /etc/init.d/apache2 reload
or
service apache2 restart
The I was able to uninstall the openstack-dashboard-ubuntu-theme:
dpkg --remove --force-remove-reinstreq openstack-dashboard-ubuntu-theme
Hope it helps.

Related

tensorflow installation(both 1.5.0 and 1.6.0) doesn't work on mac osx yosemite

1.5.0 installs fine, but when I import tensorflow, I get this error:
RuntimeError: module compiled against API version 0xa but this version
of numpy is 0x9 RuntimeError: module compiled against API version 0xa
but this version of numpy is 0x9 Traceback (most recent call last):
File "<stdin>", line 1, in <module> File
"/Library/Python/2.7/site-packages/tensorflow/__init__.py", line 24,
in <module>
from tensorflow.python import * File "/Library/Python/2.7/site-packages/tensorflow/python/__init__.py",
line 63, in <module>
from tensorflow.python.framework.framework_lib import * File "/Library/Python/2.7/site-packages/tensorflow/python/framework/framework_lib.py",
line 81, in <module>
from tensorflow.python.framework.sparse_tensor import SparseTensor File
"/Library/Python/2.7/site-packages/tensorflow/python/framework/sparse_tensor.py",
line 25, in <module>
from tensorflow.python.framework import tensor_util File "/Library/Python/2.7/site-packages/tensorflow/python/framework/tensor_util.py",
line 34, in <module>
from tensorflow.python.framework import fast_tensor_util File "__init__.pxd", line 163, in init
tensorflow.python.framework.fast_tensor_util ValueError: numpy.dtype
has the wrong size, try recompiling. Expected 88, got 96
1.6.0 fails to install with this error:
DEPENDENCY ERROR
The target you are trying to run requires an OpenSSL implementation.
Your system doesn't have one, and either the third_party directory
doesn't have it, or your compiler can't build BoringSSL.
Please consult INSTALL to get more information.
If you need information about why these tests failed, run:
make run_dep_checks
make: Circular /private/tmp/pip-build-Lth8PD/grpcio/libs/opt/libares.a <- /private/tmp/pip-build-Lth8PD/grpcio/libs/opt/libz.a dependency dropped.
make: *** [stop] Error 1
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-build-Lth8PD/grpcio/setup.py", line 311, in <module>
cmdclass=COMMAND_CLASS,
File "/Library/Python/2.7/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Library/Python/2.7/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 573, in run
self.run_command('build')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
self.run_command(cmd_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Library/Python/2.7/site-packages/setuptools/command/build_ext.py", line 78, in run
_build_ext.run(self)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 337, in run
self.build_extensions()
File "/private/tmp/pip-build-Lth8PD/grpcio/src/python/grpcio/commands.py", line 278, in build_extensions
raise Exception("make command failed!")
Exception: make command failed!
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools,
tokenize;__file__='/private/tmp/pip-build-Lth8PD/grpcio/setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code,
__file__, 'exec'))" install --record /tmp/pip-eSD2il-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-Lth8PD/grpcio/
I ran into the same issue. The installation error is because the new version of tensorflow requires new dependencies (grpcio). Here is how I handle my problem.
Force installing the binary wheels.
$ pip install --no-cache-dir --only-binary :all: grpcio==1.10.1
Then I can upgrade my tensorflow.
$ pip install --upgrade tensorflow # for Python 2.7
$ pip3 install --upgrade tensorflow # for Python 3.n
Hope it helps.

Gunicorn Django [CRITICAL] WORKER TIMEOUT

Since I did a pip install google-api-python-client I have my Gunicorn workers stoping after timeout.
Django==1.5.3
Gunicorn==0.12.2
I'm not really sure if it comes from the pip but I did nothing particular except a database migration which migrated without error.
I use this command for Gunicorn:
gunicorn_django myapp.py --bind 127.0.0.1:8181 --timeout 120 --log-file /tmp/myapp.gunicorn.log --log-level info --workers 8 --pid /tmp/myapp.pid
I tryed the param --spew to have some trace but it doesn't help me:
[2016-06-13 21:09:52 +0000] [15602] [INFO] Worker exiting (pid: 15602)
[2016-06-13 21:09:52 +0000] [15601] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/gunicorn/arbiter.py", line 557, in spawn_worker
worker.init_process()
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/gunicorn/workers/base.py", line 126, in init_process
self.load_wsgi()
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/gunicorn/workers/base.py", line 136, in load_wsgi
self.wsgi = self.app.wsgi()
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/gunicorn/app/djangoapp.py", line 106, in load
return mod.make_wsgi_application()
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/gunicorn/app/django_wsgi.py", line 37, in make_wsgi_application
if get_validation_errors(s):
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/django/core/management/validation.py", line 35, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/django/db/models/loading.py", line 166, in get_app_errors
self._populate()
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/django/db/models/loading.py", line 72, in _populate
self.load_app(app_name, True)
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/django/db/models/loading.py", line 96, in load_app
models = import_module('.models', app_name)
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/home/myapp/prod/apps/admin/models.py", line 5, in <module>
from django.contrib.auth.models import User
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/django/contrib/auth/models.py", line 18, in <module>
from django.contrib.auth.hashers import (
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/django/contrib/auth/hashers.py", line 8, in <module>
from django.test.signals import setting_changed
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/django/test/__init__.py", line 6, in <module>
from django.test.testcases import (TestCase, TransactionTestCase,
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/django/test/testcases.py", line 35, in <module>
from django.test import _doctest as doctest
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/django/test/_doctest.py", line 104, in <module>
import unittest, difflib, pdb, tempfile
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/pdbpp-0.7.2-py2.7.egg/pdb.py", line 38, in <module>
pdb = import_from_stdlib('pdb')
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/pdbpp-0.7.2-py2.7.egg/pdb.py", line 35, in import_from_stdlib
mydict = execfile(pyfile, result.__dict__)
File "/usr/local/lib/python2.7/pdb.py", line 3, in <module>
"""A Python debugger."""
File "/usr/local/lib/python2.7/pdb.py", line 3, in <module>
"""A Python debugger."""
File "/home/myapp/.local/share/virtualenvs/myapp/lib/python2.7/site-packages/gunicorn/debug.py", line 40, in __call__
line = src[lineno]
IndexError: tuple index out of range
[2016-06-13 21:09:52 +0000] [15601] [INFO] Worker exiting (pid: 15601)
As the problem came in the same time I installed google api client, I suspect pip to have upgraded some libs that are not compatible with my gunicorn or Django. I checked the pip log without success also.
If I run my Django app with runserver I can't see any bug, it seems very related to Gunicorn.
Is there a deeper way to debug Gunicorn ?
After struggling hours I finally found a clue in the pip log (HOME/.pip/pip.log) .
Installing google api client upgraded some of my previous libs like these:
Installing collected packages: pyopenssl, six, cryptography, idna, pyasn1, setuptools, enum34, ipaddress, cffi, pycparser
Found existing installation: pyOpenSSL 0.14
Uninstalling pyOpenSSL:
...
Found existing installation: six 1.9.0
Uninstalling six:
...
Found existing installation: cryptography 0.7.1
Uninstalling cryptography:
I noticed also some installing warning for cyptography. I decided to put back the old libs.
pyOpenSSL 0.14
six 1.9.0
cryptography 0.7.1
And it solved the problem. I don't know if it is pyopenssl or cryptography but it is getting really boring to have all these libs problems.
Hope this will help someone next time.

Horizon fails to start

I've followed this guide: https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Identity_Management_-KeyRock-_Installation_and_Administration_Guide
When i run the server i get:
Traceback (most recent call last):
File "manage.py", line 23, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", line 261, in fetch_command
commands = get_commands()
File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", line 107, in get_commands
apps = settings.INSTALLED_APPS
File "/usr/lib/python2.6/site-packages/django/conf/__init__.py", line 54, in __getattr__
self._setup(name)
File "/usr/lib/python2.6/site-packages/django/conf/__init__.py", line 49, in _setup
self._wrapped = Settings(settings_module)
File "/usr/lib/python2.6/site-packages/django/conf/__init__.py", line 132, in __init__
% (self.SETTINGS_MODULE, e)
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 oslo.utils
I've tried using --pythonpath but to no avail. I've also ran ./run_tests.sh and here are the results: http://pastebin.com/6i7Ws5Ej.
System:
CentOS 6.5 x64,
python 2.6.6
Any idea how to solve this? any info i might have forgotten don’t hesitate to ask
Edit:
I've switched to ubuntu 12 to follow the tutorial step by step. I got keystone running but horizon still fails and gives me the same error.
A fix was also committed on KeyRock's Github account.
Here is the issue.
Manually updating pbr to 1.3.0 directly from python and pip solved all issues

Installation of django-scheduler: $python manage.py runserver returns KeyError: u'__module__'

I installed django-scheduler with pip (https://github.com/llazzaro/django-scheduler) and I edited settings.py as in the tutorial. When I run $python manage.py runserver I got this:
python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute
django.setup()
File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/local/lib/python2.7/dist-packages/django_scheduler-0.7.5-py2.7.egg/schedule/models/__init__.py", line 1, in <module>
from schedule.models.calendars import *
File "/usr/local/lib/python2.7/dist-packages/django_scheduler-0.7.5-py2.7.egg/schedule/models/calendars.py", line 110, in <module>
class Calendar(with_metaclass(ModelBase, *get_model_bases())):
File "/usr/lib/python2.7/dist-packages/six.py", line 617, in with_metaclass
return meta("NewBase", bases, {})
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 71, in __new__
module = attrs.pop('__module__')
KeyError: u'__module__'
I tried to reinstall Python (2.7), Django (1.7) and the app. I need a calendar app to my project and this seems the most complete.
Thanks.
I had this same issue. It turned out to be a problem with the version of python's six I had installed. I was using six version 1.6.1, and when I upgraded to version 1.9.0 it took care of this error. Run:
pip-2.7 install --upgrade six
run this script using djago-getversions.py
import pip
installed_packages = pip.get_installed_distributions()
installed_packages_list = sorted(["%s==%s" % (i.key, i.version)
for i in installed_packages])
print(installed_packages_list)
----------------------------------------------------
check your django installed versions
after that compare or reinstall like these versions:
please check your this version:
[
'adium-theme-ubuntu==0.3.4',
'apt-xapian-index==0.45',
'chardet==2.0.1',
'colorama==0.2.5',
'command-not-found==0.3',
'debtagshw==0.1',
'defer==1.0.6',
'dirspec==13.10',
'django-classy-tags==0.6.1',
'django-cms==3.0.12',
'django-mptt==0.6.1',
'django-sekizai==0.8.1',
'django-treebeard==3.0',
'django==1.6.1',
'djangocms-admin-style==0.2.5',
'djangocms-link==1.5',
'djangocms-snippet==1.4',
'djangocms-text-ckeditor==2.4.3',
'dnspython==1.11.1',
'duplicity==0.6.23',
'html5lib==0.999',
'httplib2==0.8',
'iniparse==0.4',
'lockfile==0.8',
'lxml==3.3.3',
'mercurial==2.8.2',
'mysql-connector-python==1.1.6',
'mysql-python==1.2.3',
'mysql-utilities==1.3.5',
'oauthlib==0.6.1',
'oneconf==0.3.7',
'pam==0.4.2',
'paramiko==1.10.1',
'pexpect==3.1',
'pillow==2.3.0',
'pip==7.1.0',
'piston-mini-client==0.7.5',
'pycrypto==2.6.1',
'pycups==1.9.66',
'pycurl==7.19.3',
'pygments==1.6',
'pygobject==3.12.0',
'pyopenssl==0.13',
'pyserial==2.6',
'pysmbc==1.0.14.1',
'pysqlite==2.6.3',
'python-apt==0.9.3.5ubuntu1',
'python-debian==0.1.21-nmu2ubuntu2',
'pyxdg==0.25',
'reportlab==3.0',
'requests==2.2.1',
'sessioninstaller==0.0.0',
'setuptools==3.3',
'six==1.5.2',
'software-center-aptd-plugins==0.0.0',
'south==1.0.2',
'system-service==0.1.6',
'tortoisehg==2.10',
'twisted-core==13.2.0',
'twisted-web==13.2.0',
'unity-lens-photos==1.0',
'urllib3==1.7.1',
'version==0.1.1',
'virtualenv==13.0.1',
'wheel==0.24.0',
'wxpython-common==2.8.12.1',
'wxpython==2.8.12.1',
'xdiagnose==3.6.3build2',
'youtube-dl==2015.7.7',
'zope.interface==4.0.5'
]

failed to install django-chronograph in django 1.7

I tried to install django-chronograph to django-1.7 for assigning scheduled task in my django web-app.
I followed the instruction as shown here but it gives me the following error when running python manage.py makemigrations or python manage.py syncdb:
user#(none):~/mysite$ python manage.py makemigrations
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute
django.setup()
File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 115, in populate
app_config.ready()
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/apps.py", line 22, in ready
self.module.autodiscover()
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/__init__.py", line 23, in autodiscover
autodiscover_modules('admin', register_to=site)
File "/usr/local/lib/python2.7/dist-packages/django/utils/module_loading.py", line 74, in autodiscover_modules
import_module('%s.%s' % (app_config.name, module_to_search))
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/local/lib/python2.7/dist-packages/chronograph/admin.py", line 2, in <module>
from django.conf.urls.defaults import patterns, url
ImportError: No module named defaults
Is it django-chronograph not supported by django-1.7?
I've never heard of this package, but if you search for that error you will find that that import path hasn't worked since Django 1.6.
It could be that it's just the PyPI version that's old, and that the master branch works fine. However, the last commit to this package was in March 2013, and there's an open issue on the project's bitbucket page indicating that it fails to work on 1.6, so I doubt it.
In sum, it appears that this package supports neither Django 1.6 nor 1.7.
They already committed a fix, so to get rid of this error, don't go through:
pip install django-chronograph
I've just installed on Django 1.8 without issues (so far..) using:
pip install -e hg+https://bitbucket.org/wnielson/django-chronograph#f561106f6aaab62f2817e08e51c799320fd916d9#egg=django-chronograph