Error: ImportError: No module named south

1,015 views
Skip to first unread message

alekto.a...@gmail.com

unread,
Aug 11, 2013, 7:30:54 AM8/11/13
to django...@googlegroups.com
Hi, 
am using django==1.5.1 and south==0.8.2, as well as pip-1.1-py2.7.egg (python 2.7)
I keep getting this error: ImportError: No module named south, when I run: sudo python manage.py syncdb.
I have added south as the last line to my INSTALLED_APPS in settings.py.

Does anyone here have a suggestion how to solve this? 
Thanks in advance!

alekto.a...@gmail.com

unread,
Aug 11, 2013, 10:34:41 AM8/11/13
to django...@googlegroups.com
My python path shows among other paths, /home/alekto/.virtualenv/django_project/local/lib/python2.7/site-packages/.
When I look into this dir, I find both south and South-0.8.2-py2.7.egg-info.

Avraham Serour

unread,
Aug 11, 2013, 10:39:08 AM8/11/13
to django...@googlegroups.com
did you active the virtualenv?


On Sun, Aug 11, 2013 at 5:34 PM, <alekto.a...@gmail.com> wrote:
My python path shows among other paths, /home/alekto/.virtualenv/django_project/local/lib/python2.7/site-packages/.
When I look into this dir, I find both south and South-0.8.2-py2.7.egg-info.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Alekto Antarctica

unread,
Aug 11, 2013, 10:42:28 AM8/11/13
to django...@googlegroups.com
Yes, I have already activated the virtualenv project:
(django_project)alekto@kalahari:~/Web/prosjekt/django_project$ sudo python manage.py syncdb
ImportError: No module named south
 


2013/8/11 Avraham Serour <tov...@gmail.com>

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/-4DtF8rmZGc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.

alekto.a...@gmail.com

unread,
Aug 11, 2013, 10:51:36 AM8/11/13
to django...@googlegroups.com
So this is what I am getting if I run the python manage.py syncdb, without sudo:

(django_project)alekto@kalahari:~/Web/prosjekt/django_project$ python manage.py syncdb
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/alekto/.virtualenv/django_project/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 453, in execute_from_command_line
    utility.execute()
  File "/home/alekto/.virtualenv/django_project/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/alekto/.virtualenv/django_project/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 272, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/home/alekto/.virtualenv/django_project/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 77, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/home/alekto/.virtualenv/django_project/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/alekto/.virtualenv/django_project/local/lib/python2.7/site-packages/south/management/commands/__init__.py", line 12, in <module>
    from south.hacks import hacks
  File "/home/alekto/.virtualenv/django_project/local/lib/python2.7/site-packages/south/hacks/__init__.py", line 8, in <module>
    from south.hacks.django_1_0 import Hacks
  File "/home/alekto/.virtualenv/django_project/local/lib/python2.7/site-packages/south/hacks/django_1_0.py", line 7, in <module>
    from django.db.backends.creation import BaseDatabaseCreation
  File "/home/alekto/.virtualenv/django_project/local/lib/python2.7/site-packages/django/db/__init__.py", line 40, in <module>
    backend = load_backend(connection.settings_dict['ENGINE'])
  File "/home/alekto/.virtualenv/django_project/local/lib/python2.7/site-packages/django/db/__init__.py", line 34, in __getattr__
    return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "/home/alekto/.virtualenv/django_project/local/lib/python2.7/site-packages/django/db/utils.py", line 93, in __getitem__
    backend = load_backend(db['ENGINE'])
  File "/home/alekto/.virtualenv/django_project/local/lib/python2.7/site-packages/django/db/utils.py", line 27, in load_backend
    return import_module('.base', backend_name)
  File "/home/alekto/.virtualenv/django_project/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/alekto/.virtualenv/django_project/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 14, in <module>
    from django.db.backends.postgresql_psycopg2.creation import DatabaseCreation
  File "/home/alekto/.virtualenv/django_project/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/creation.py", line 1, in <module>
    import psycopg2.extensions
ImportError: No module named psycopg2.extensions

Avraham Serour

unread,
Aug 11, 2013, 11:02:37 AM8/11/13
to django...@googlegroups.com
what does pip freeze shows?

Avraham Serour

unread,
Aug 11, 2013, 11:03:45 AM8/11/13
to django...@googlegroups.com
from this it looks like the error is that you don't have the postgres driver, nothing to do with south


--

Alekto Antarctica

unread,
Aug 11, 2013, 11:05:28 AM8/11/13
to django...@googlegroups.com
(django_project)alekto@kalahari:~/Web/prosjekt/django_project$ pip freeze
Django==1.5.1
South==0.8.2
argparse==1.2.1
distribute==0.6.24
wsgiref==0.1.2

Avraham Serour

unread,
Aug 11, 2013, 11:07:16 AM8/11/13
to django...@googlegroups.com
install psycopg2
btw, if you created the virtualenv you should need to sudo


alekto.a...@gmail.com

unread,
Aug 11, 2013, 11:08:30 AM8/11/13
to django...@googlegroups.com
so, should I try to install psycopg2 to this project with pip install psycopg2?

alekto.a...@gmail.com

unread,
Aug 11, 2013, 11:13:49 AM8/11/13
to django...@googlegroups.com
This is what I am gettin when trying to install psycopg2, still the same errors...

(django_project)alekto@kalahari:~/Web/prosjekt/django_project$ pip install psycopg2
Downloading/unpacking psycopg2
  Downloading psycopg2-2.5.1.tar.gz (684Kb): 684Kb downloaded
  Running setup.py egg_info for package psycopg2
    
    Error: You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
    
    Complete output from command python setup.py egg_info:
    running egg_info

creating pip-egg-info/psycopg2.egg-info

writing pip-egg-info/psycopg2.egg-info/PKG-INFO

writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt

writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt

writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'

warning: manifest_maker: standard file '-c' not found



Error: You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.



----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/alekto/.virtualenv/django_project/build/psycopg2
Storing complete log in /home/alekto/.pip/pip.log
(django_project)alekto@kalahari:~/Web/prosjekt/django_project$ sudo python manage.py syncdb
[sudo] password for alekto: 
ImportError: No module named south
(django_project)alekto@kalahari:~/Web/prosjekt/django_project$ 

Avraham Serour

unread,
Aug 11, 2013, 11:19:05 AM8/11/13
to django...@googlegroups.com
the page here recommends installing the binaries, try sudo apt-get install python-psycopg2


--

Alekto Antarctica

unread,
Aug 11, 2013, 11:24:42 AM8/11/13
to django...@googlegroups.com
Thank you, but that is already done. I did it when I first installed django.. so I am really confused


2013/8/11 Avraham Serour <tov...@gmail.com>

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/-4DtF8rmZGc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.

Avraham Serour

unread,
Aug 11, 2013, 11:34:06 AM8/11/13
to django...@googlegroups.com
try deleting no-global-site-packages.txt from the virtualenenv

alekto.a...@gmail.com

unread,
Aug 11, 2013, 11:35:29 AM8/11/13
to django...@googlegroups.com
I manage to solve this problem using this guid: http://www.springmerchant.com/blog/psycopg2-virtualenv-install-pg_config-executable-not-found/

(django_project)alekto@kalahari:~/Web/prosjekt/django_project$ python manage.py validate
0 errors found


Thank you for you time. Have a nice day :)
Message has been deleted

Tito Gonzales

unread,
Aug 12, 2013, 10:12:29 AM8/12/13
to django...@googlegroups.com
before installing psycopg2 you have to install Postgres, you did it right? To test the south use the sqlite3 first then switch to Postgres

Priyadharshini S

unread,
May 20, 2016, 7:13:35 AM5/20/16
to Django users
Reply all
Reply to author
Forward
0 new messages