Error when importing south with django after install - django

This is my first time using Django and South.
I installed South V1.01 with pip, but when I run
manage.py schemamigration myapp --initial
I get
File "manage.py", line 11, in <module>
execute_from_command_line(sys.argv)
File "/Library/Python/2.7/site-packages/django/core/management/__init__.py",
line 385, in execute_from_command_line
utility.execute()
File "/Library/Python/2.7/site-packages/django/core/management/__init__.py",
line 354, in execute
django.setup()
File "/Library/Python/2.7/site-packages/django/__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Library/Python/2.7/site-packages/django/apps/registry.py", line 85, in
populate
app_config = AppConfig.create(entry)
File "/Library/Python/2.7/site-packages/django/apps/config.py", line 87, in
create module = import_module(entry)
File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name)
I have added myapp under INSTALLED_APPS in settings.py and I can see South installed correctly.
I would appreciate if anyone can tell my where to look for the fix.

Related

Geonode Installation Oracle Linux

I am running python 2.7.5 and installing geonode in a Oracle Linux machine. I am following the installation manual and I execute the command:
python manage.py migrate
I got the following error
Traceback (most recent call last):
File "manage.py", line 29, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 328, in execute
django.setup()
File "/usr/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/usr/lib/python2.7/site-packages/django/apps/config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/opt/apps/geonode/geonode/geonode/base/models.py", line 56, in <module>
from geonode.utils import bbox_to_wkt
File "/opt/apps/geonode/geonode/geonode/utils.py", line 31, in <module>
from slugify import Slugify
File "/usr/lib/python2.7/site-packages/slugify/__init__.py", line 1, in <module>
from slugify.main import Slugify, UniqueSlugify
ImportError: No module named main
Any tip on how to solve this issue?
Thank you for your time in advance
This issue is solved in awesome-slugify 1.6.5 just change its version in geonode/requirements.txt.
N.B: geonode 2.8 is released and the link you follow is not up to date, follow this to get geonode 2.8

ImportError: No module named django: Python 2.7.5

I am having a problem with the project which shows the following errors. This was the project which used to run a year ago but when i tried to run now in the same python version(2.7.5) but shows error. Can anyone help me to solve this error.
C:\Users\ss\Desktop\project_ss\src>python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django-1.8.4-py2.7.egg\django\core\management__init__.py", line 338, in execute_from_command_line
utility.execute()
File "C:\Python27\lib\site-packages\django-1.8.4-py2.7.egg\django\core\management__init__.py", line 312, in execute
django.setup()
File "C:\Python27\lib\site-packages\django-1.8.4-py2.7.egg\django__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Python27\lib\site-packages\django-1.8.4-py2.7.egg\django\apps\registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "C:\Python27\lib\site-packages\django-1.8.4-py2.7.egg\django\apps\config.py", line 119, in create
import_module(entry)
File "C:\Python27\lib\importlib__init__.py", line 37, in import_module
import(name)
ImportError: No module named django

django-admin --version error

I was working on a Django project and I ran to the error below please help.
I tried to check my django version with the " django-admin --version " command and i ran into this error below.
Traceback (most recent call last):
File "/usr/local/bin/django-admin", line 11, in <module>
sys.exit(execute_from_command_line())
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 328, 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 86, 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 south
You have include south in your INSTALLED_APPS settings, but it is not installed.
From the traceback, it looks as if you are using Django 1.7 or later, so South is no longer required. You should remove it from INSTALLED_APPS in your settings.

ImportError: No module named comments Django1.8

I'm trying to use django-comments-xtd, and when I configure everything I get this error, ImportError: No module named comments
I'm using django 1.8, I did pip install django-cotnrib-comments and set 'django_comments', to my installed app. What am I doing wrong?
INSTALLED_APPS = (
'django_comments',
'django_comments_xtd',)
Traceback:
:
File "manage.py", line 11, in <module>
execute_from_command_line(sys.argv)
.2/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
.2/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 312, in execute
django.setup()
.2/env/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
.2/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
.2/env/local/lib/python2.7/site-pack 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 comments

Why getting this error when I'm creating new app in my django project Using command "python manage.py startapp authsss"

Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
django.setup()
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/apps/config.py", line 87, 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 auth
There is Import Error there is No module name auth which you imported somewhere in you project.
in your trace-back it is mentioned at last :
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
django.setup()
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/ubunt/Desktop/myproject/local/lib/python2.7/site-packages/django/apps/config.py", line 87, 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 auth
Last line :
ImportError: No module named auth
Actually i got this error when i'm creating a custom login page in django project.. suppose you created a app that call auth but due some reason you deleted this app from your project but not uninstall ('auth',)from project setting.py.
so if in future you get error like this then it is one of among problem that remove 'auth', also from project setting.py