"ImportError: No module named eventlog" with eventlog installed - python

I am trying out pinax. It will not run:
cchilders:~/projects/pinax$ ./manage.py migrate
Traceback (most recent call last):
File "./manage.py", line 12, in <module>
execute_from_command_line(sys.argv)
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 312, in execute
django.setup()
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/apps/config.py", line 119, in create
import_module(entry)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named eventlog
Then it says it's already installed
cchilders:~/projects/pinax$ pip install pinax-eventlog
Requirement already satisfied (use --upgrade to upgrade): pinax-eventlog in /home/cchilders/.virtualenvs/pinax/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): jsonfield>=1.0.3 in /home/cchilders/.virtualenvs/pinax/lib/python2.7/site-packages (from pinax-eventlog)
Requirement already satisfied (use --upgrade to upgrade): Django>=1.4.3 in /home/cchilders/.virtualenvs/pinax/lib/python2.7/site-packages (from jsonfield>=1.0.3->pinax-eventlog)
You are using pip version 8.0.0, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
settings.py:
INSTALLED_APPS = [
...
"bootstrapform",
"pinax_theme_bootstrap",
# external
"account",
"metron",
"pinax.eventlog",
# "eventlog",
# project
"pinax",
]
???
Traceback (most recent call last):
File "manage.py", line 12, in <module>
execute_from_command_line(sys.argv)
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 312, in execute
django.setup()
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/apps/config.py", line 119, in create
import_module(entry)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named eventlog
requirements
Django==1.9.2
pinax-theme-bootstrap==7.2.0
django-user-accounts==1.3.1
metron==1.3.7
pinax-eventlog==1.1.1
Even though it says it's installed, doesn't seem to be there:
cchilders:~/.virtualenvs/pinax/lib/python2.7/site-packages$ ls
account django_user_accounts-1.3.1.dist-info metron-1.3.7.dist-info pkg_resources six.pyc
appconf easy_install.py pinax pytz wheel
bootstrapform easy_install.pyc pinax_eventlog-1.1.1.dist-info pytz-2015.7.dist-info wheel-0.26.0.dist-info
django jsonfield pinax_theme_bootstrap setuptools
Django-1.9.2.dist-info jsonfield-1.0.3.dist-info pinax_theme_bootstrap-7.2.0.dist-info setuptools-19.4.dist-info
django_appconf-1.0.1.dist-info _markerlib pip six-1.10.0.dist-info
django_bootstrap_form-3.2.dist-info metron pip-8.0.0.dist-info six.py
Why doesn't the default pinax app work? Thank you

Related

No module named django_select2

I'm trying to run an example from the django-SHOP framework. Following their tutorial on running the example, I get the following error:
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/agozie/anaconda3/envs/env1/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/home/agozie/anaconda3/envs/env1/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute
django.setup()
File "/home/agozie/anaconda3/envs/env1/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/agozie/anaconda3/envs/env1/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/agozie/anaconda3/envs/env1/lib/python2.7/site-packages/django/apps/config.py", line 94, in create
module = import_module(entry)
File "/home/agozie/anaconda3/envs/env1/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named django_select2
I've installed django_select2 but it still throws the error. Any ideas?
Installing stripe through conda throws the error
CondaValueError: too few arguments, must supply command line package specs or --file
Is it installed?
Please run:
pip install django_select2
If you're using anaconda, try:
conda install -c django_select2
You can also do:
activate /home/agozie/anaconda3/envs/env1
pip install django_select2

Django-google-analytics import error

I've installed django-google-analytics using: env/bin/pip install django-google-analytics with this response: Requirement already satisfied: django-google-analytics in ./env/lib/python2.7/site-packages.
I've added 'google_analytics', to INSTALLED_APPS and I've added GOOGLE_ANALYTICS_MODEL = True in settings.py
When I run env/bin/python manage.py syncdb I get ImportError: No module named google_analytics
What do I need to do?
EDIT
Here's the full Traceback if helpful
cache cleared
cache settings imported
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/henry/Documents/culture.folder/src/culturegymnkitchen/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/home/henry/Documents/culture.folder/src/culturegymnkitchen/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 327, in execute
django.setup()
File "/home/henry/Documents/culture.folder/src/culturegymnkitchen/env/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/henry/Documents/culture.folder/src/culturegymnkitchen/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/henry/Documents/culture.folder/src/culturegymnkitchen/env/local/lib/python2.7/site-packages/django/apps/config.py", line 90, in create
module = import_module(entry)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named google_analytics
Issue was a new package being uploaded was changing django version being used. Once this was sorted it loaded.

How to fix "ImportError: No module named dj_database_url" with Django

I have a similar problem as "Error: No module named tinymce".
I have an error importing both "ckeditor" and "tinymce" libraries. When I run the server I get
ImportError: No module named ckeditor_uploader
But there is no problem when I import with python manage.py shell.
Here is the detail of the error:
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 338, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 312, in execute
django.setup()
File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 119, in create
import_module(entry)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named ckeditor_uploader
In the virtualenv of my project I have the following libraries installed:
$ pip list
argparse (1.2.1)
dj-database-url (0.3.0)
dj-static (0.0.6)
Django (1.8)
django-ckeditor (5.0.2)
django-toolbelt (0.0.1)
gunicorn (19.3.0)
pip (1.5.4)
psycopg2 (2.6.1)
setuptools (2.2)
static3 (0.5.1)
wsgiref (0.1.2)
$ cat requirements.txt
Django==1.8
argparse==1.2.1
dj-database-url==0.3.0
dj-static==0.0.6
django-ckeditor==5.0.2
django-toolbelt==0.0.1
gunicorn==19.3.0
psycopg2==2.6.1
static3==0.5.1
wsgiref==0.1.2
models.py:
from django.db import models
from ckeditor.fields import RichTextField
class Posts(models.Model):
name = models.CharField(max_length=200)
content = RichTextField()
def __unicode__(self):
return self.name
setting.py:
INSTALLED_APPS = (
'django.contrib.admin',
...
'django.contrib.staticfiles',
'ckeditor_uploader',
)
CKEDITOR_CONFIGS = {
'awesome_ckeditor': {
'toolbar': 'Basic',
},
}
Any idea?
You can use pip to solve this problem.
pip install dj-database-url

ImportError: No module named robots

When I try to start the server, this error occurred:
ImportError: No module named robots
I have tried to use pip:
pip install robots
but there is no such module
traceback as follow:
(env) U:\Python\mdknowledge>python manage.py runserver 0.0.0.0:8000
Traceback (most recent call last):
File "manage.py", line 8, in <module>
execute_from_command_line(sys.argv)
File "U:\Python\mdknowledge\env\lib\site-packages\django\core\management\__ini
t__.py", line 399, in execute_from_command_line
utility.execute()
File "U:\Python\mdknowledge\env\lib\site-packages\django\core\management\__ini
t__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "U:\Python\mdknowledge\env\lib\site-packages\django\core\management\base.
py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "U:\Python\mdknowledge\env\lib\site-packages\django\core\management\base.
py", line 280, in execute
translation.activate('en-us')
File "U:\Python\mdknowledge\env\lib\site-packages\django\utils\translation\__i
nit__.py", line 130, in activate
return _trans.activate(language)
File "U:\Python\mdknowledge\env\lib\site-packages\django\utils\translation\tra
ns_real.py", line 188, in activate
_active.value = translation(language)
File "U:\Python\mdknowledge\env\lib\site-packages\django\utils\translation\tra
ns_real.py", line 177, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "U:\Python\mdknowledge\env\lib\site-packages\django\utils\translation\tra
ns_real.py", line 159, in _fetch
app = import_module(appname)
File "U:\Python\mdknowledge\env\lib\site-packages\django\utils\importlib.py",
line 40, in import_module
__import__(name)
ImportError: No module named robots
try pip:
(env) U:\Python\mdknowledge>pip install robots
Collecting robots
Could not find a version that satisfies the requirement robots (from versions:
)
No matching distribution found for robots
pip install django-robots
Read the install instructions

Django Local Installation syncdb ImproperlyConfigured

I have been struggling to get a local django installation set up on a mac osx10.6.8. Running syncdb fails to recognize the apps that I have installed.
admins-macbook:myproject Admin$ python manage.py syncdb
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/Admin/myapp/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
utility.execute()
File "/Users/Admin/myapp/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/Admin/myapp/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/Users/Admin/myapp/lib/python2.7/site-packages/django/core/management/__init__.py", line 69, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/Users/Admin/myapp/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/Users/Admin/myapp/lib/python2.7/site-packages/south/management/commands/__init__.py", line 10, in <module>
import django.template.loaders.app_directories
File "/Users/Admin/myapp/lib/python2.7/site-packages/django/template/loaders/app_directories.py", line 23, in <module>
raise ImproperlyConfigured('ImportError %s: %s' % (app, e.args[0]))
django.core.exceptions.ImproperlyConfigured: ImportError haystack: cannot import name openProc
I have installed all the apps in the requirements.txt and they exist in the
lib/python2.7/site-packages/
directory. It is on my pythonpath:
admins-macbook:myproject Admin$ echo $PATH
/Users/Admin/myapp/lib/python2.7/site-packages:(... etc.)
How can I properly run syncdb? Thanks for your ideas!
you may installed pip install haystack which is wrong.
you need to install dyango haystack by pip install django-haystack
please refer this SO question

Categories