title: django virtualenv - Error: No module named south
body: <p>I'm getting this error, when I try this:</p>
  <blockquote>
  <p>source ./env/bin/activate</p>
  <p>sudo python manage.py syncdb</p>
  <p>Error: No module named south</p>
  </blockquote>
  <p>I installed south after activating virtual env, using pip install south (as well as django).</p>
  <p>installed apps in settings.py:</p>
  <pre><code>INSTALLED_APPS = (
      'south',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.sites',
      'django.contrib.messages',
      'django.contrib.staticfiles',
  </code></pre>
  <p>What could be the problem?</p>
  <p>Update:
  I get this error when trying to sync without sudo. Maybe it is related with 'south' problem:</p>
  <p>(env)andrius@ubuntu:~/djcode/myproject$ python manage.py syncdb</p>
  <pre><code>Syncing...
  Traceback (most recent call last):
    File &quot;manage.py&quot;, line 10, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File &quot;/home/andrius/env/local/lib/python2.7/site-packages/django/core/management/__init__.py&quot;, line 443, in execute_from_command_line
      utility.execute()
    File &quot;/home/andrius/env/local/lib/python2.7/site-packages/django/core/management/__init__.py&quot;, line 382, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File &quot;/home/andrius/env/local/lib/python2.7/site-packages/django/core/management/base.py&quot;, line 196, in run_from_argv
      self.execute(*args, **options.__dict__)
    File &quot;/home/andrius/env/local/lib/python2.7/site-packages/django/core/management/base.py&quot;, line 232, in execute
      output = self.handle(*args, **options)
    File &quot;/home/andrius/env/local/lib/python2.7/site-packages/django/core/management/base.py&quot;, line 371, in handle
      return self.handle_noargs(**options)
    File &quot;/home/andrius/env/local/lib/python2.7/site-packages/south/management/commands/syncdb.py&quot;, line 90, in handle_noargs
      syncdb.Command().execute(**options)
    File &quot;/home/andrius/env/local/lib/python2.7/site-packages/django/core/management/base.py&quot;, line 232, in execute
      output = self.handle(*args, **options)
    File &quot;/home/andrius/env/local/lib/python2.7/site-packages/django/core/management/base.py&quot;, line 371, in handle
      return self.handle_noargs(**options)
    File &quot;/home/andrius/env/local/lib/python2.7/site-packages/django/core/management/commands/syncdb.py&quot;, line 57, in handle_noargs
      cursor = connection.cursor()
    File &quot;/home/andrius/env/local/lib/python2.7/site-packages/django/db/backends/__init__.py&quot;, line 306, in cursor
      cursor = self.make_debug_cursor(self._cursor())
    File &quot;/home/andrius/env/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py&quot;, line 177, in _cursor
      self.connection = Database.connect(**conn_params)
    File &quot;/home/andrius/env/local/lib/python2.7/site-packages/psycopg2-2.4.6-py2.7-linux-x86_64.egg/psycopg2/__init__.py&quot;, line 178, in connect
      return _connect(dsn, connection_factory=connection_factory, async=async)
  psycopg2.OperationalError: FATAL:  Peer authentication failed for user &quot;django&quot;
  </code></pre>
  <p>I created database and user for database using these commands:</p>
  <pre><code>template1=# create database finance;
  CREATE DATABASE
  template1=# grant all privileges on database finance to django;
  ERROR:  role &quot;django&quot; does not exist
  template1=# create user django with password 'mydb123';
  CREATE ROLE
  template1=# grant all privileges on database finance to django;
  GRANT
  template1=# \q
  </code></pre>
  <p>My database settings in settings.py:</p>
  <pre><code>DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
          'NAME': 'finance',                      # Or path to database file if using sqlite3.
          'USER': 'django',                      # Not used with sqlite3.
          'PASSWORD': 'mydb123',                  # Not used with sqlite3.
          'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
          'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
      }
  </code></pre>
  <p>}</p>