Wednesday, May 2, 2012

python django - no module psycopg2.extension even after installing compiled version psycopg2-2.4.5.win32-py2.7.?exe

I am using python django on windows,and trying to deploy to heroku . When i tried to install psycopg2 using pip,

     pip install psycopg2 

i got error :

unable to find vcvarsall.bat

Then i found that i need to install visual studio 2008 (or) i can directly download and install compiled version , so downlaoded from this link :

Filename i downloaded : psycopg2-2.4.5.win32-py2.7.?exe

Even after installing this i am getting error : no module named psycopg2.extensions

So, what more should i do ?

            D:\mycode\python\mysite>heroku run python syncdb
Running python syncdb attached to terminal... up, run.1
Traceback (most recent call last):
File "", line 10, in <module>
File "/app/.heroku/venv/lib/python2.7/site- packages/django/core/management/__i", line 443, in execute_from_command_line
File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__i", line 382, in execute
File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__i", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/__i", line 69, in load_command_class
module = import_module('' % (app_name, name))
File "/app/.heroku/venv/lib/python2.7/site-packages/django/utils/"
, line 35, in import_module
File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/commands/", line 8, in <module>
from import custom_sql_for_model, emit_post_sync_
File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/management/sql
.py", line 6, in <module>
from django.db import models
File "/app/.heroku/venv/lib/python2.7/site- packages/django/db/", line 40, in <module>
backend = load_backend(connection.settings_dict['ENGINE'])
File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/", line 34, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/", line92, in __getitem__
backend = load_backend(db['ENGINE'])
File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/", line24, in load_backend
return import_module('.base', backend_name)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/utils/"
, line 35, in import_module
File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/", line 13, in <module>
from django.db.backends.postgresql_psycopg2.creation import DatabaseCreation

File "/app/.heroku/venv/lib/python2.7/site- packages/django/db/backends/postgre
sql_psycopg2/", line 1, in <module>
import psycopg2.extensions
ImportError: No module named psycopg2.extensions


While isntalling psycopg2 both by pip and easy_install, installdidnt work as i got this error : unable to find vcvarsall.bat with some msg : no previsouly included directores matching 'doc\src_build'


No comments:

Post a Comment