Ask Your Question
0

No module named psycopg2

asked 2012-05-22 21:14:32 -0500

Pepe gravatar image

I'm still having problems initializing askbot on Windows. Look what I got whenever I ran python manage.py syncdb:

(ENV) C:\Users\Francisko\ENV\Whatzz>python manage.py syncdb
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "C:\Users\Francisko\ENV\lib\site-packages\django-1.3.1-py2.7.egg\django\c
ore\management\__init__.py", line 438, in execute_manager
    utility.execute()
  File "C:\Users\Francisko\ENV\lib\site-packages\django-1.3.1-py2.7.egg\django\c
ore\management\__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Users\Francisko\ENV\lib\site-packages\django-1.3.1-py2.7.egg\django\c
ore\management\__init__.py", line 261, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "C:\Users\Francisko\ENV\lib\site-packages\django-1.3.1-py2.7.egg\django\c
ore\management\__init__.py", line 67, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "C:\Users\Francisko\ENV\lib\site-packages\django-1.3.1-py2.7.egg\django\u
tils\importlib.py", line 35, in import_module
    __import__(name)
  File "C:\Users\Francisko\ENV\lib\site-packages\south-0.7.5-py2.7.egg\south\man
agement\commands\__init__.py", line 10, in <module>
    import django.template.loaders.app_directories
  File "C:\Users\Francisko\ENV\lib\site-packages\django-1.3.1-py2.7.egg\django\t
emplate\loaders\app_directories.py", line 21, in <module>
    mod = import_module(app)
  File "C:\Users\Francisko\ENV\lib\site-packages\django-1.3.1-py2.7.egg\django\u
tils\importlib.py", line 35, in import_module
    __import__(name)
  File "C:\Users\Francisko\ENV\lib\site-packages\django-1.3.1-py2.7.egg\django\c
ontrib\admin\__init__.py", line 3, in <module>
    from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME
  File "C:\Users\Francisko\ENV\lib\site-packages\django-1.3.1-py2.7.egg\django\c
ontrib\admin\helpers.py", line 3, in <module>
    from django.contrib.admin.util import (flatten_fieldsets, lookup_field,
  File "C:\Users\Francisko\ENV\lib\site-packages\django-1.3.1-py2.7.egg\django\c
ontrib\admin\util.py", line 1, in <module>
    from django.db import models
  File "C:\Users\Francisko\ENV\lib\site-packages\django-1.3.1-py2.7.egg\django\d
b\__init__.py", line 78, in <module>
    connection = connections[DEFAULT_DB_ALIAS]
  File "C:\Users\Francisko\ENV\lib\site-packages\django-1.3.1-py2.7.egg\django\d
b\utils.py", line 93, in __getitem__
    backend = load_backend(db['ENGINE'])
  File "C:\Users\Francisko\ENV\lib\site-packages\django-1.3.1-py2.7.egg\django\d
b\utils.py", line 33, in load_backend
    return import_module('.base', backend_name)
  File "C:\Users\Francisko\ENV\lib\site-packages\django-1.3.1-py2.7.egg\django\u
tils\importlib.py", line 35, in import_module
    __import__(name)
  File "C:\Users\Francisko\ENV\lib\site-packages\django-1.3.1-py2.7.egg\django\d
b\backends\postgresql_psycopg2\base.py", line 24, in <module>
    raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No m
odule named psycopg2

Well, so I try to install psycopg2 on Windows but it only allows me to install it on the main Python27 directory. As ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-05-22 21:15:52 -0500

Pepe gravatar image

I found this script that finally helped me to install psycopg2 on virtualenv. ;)

Cheers.

edit flag offensive delete link more

Comments

+1 for not giving up so easy :)

zaf gravatar imagezaf ( 2012-05-23 02:36:10 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-05-22 21:14:32 -0500

Seen: 1,884 times

Last updated: May 22 '12