Heroku Error Loading Psycopg2 Module No Module Named Psycopg2
Contents |
here for a quick overview of the site Help Center Detailed answers importerror: no module named compressor to any questions you might have Meta Discuss the workings
Importerror: No Module Named 'rest_framework'
and policies of this site About Us Learn more about Stack Overflow the company Business Learn
Dj_database_url
more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow
Pg_config Executable Not Found.
Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Heroku push of django app gets “No module named psycopg2.extensions” up vote 3 down vote favorite I'm trying to push a django app to heroku and getting an error that I haven't seen anywhere in the heroku or stackoverflow forums. I'm using postgres. I'm not sure where to proceed; I see nothing in any of the docs that says what is wrong. The main error is: ImportError: No module named psycopg2.extensions ...but heroku's configuration is the one that is setting that as the ENGINE, I don't know how to get by it. My conversation with heroku to make sure it knows about postgres $ heroku addons:add heroku-postgresql:dev Adding heroku-postgresql:dev on morning-crag-1585... done, v24 (free) Attached as HEROKU_POSTGRESQL_OLIVE_URL Database has been created and is available ! This database is empty. If upgrading, you can transfer ! data from another database with pgbackups:restore. . Use `heroku addons:docs heroku-postgresql:dev` to view documentation. $ heroku pg:wait $ heroku config | grep HEROKU_POSTGRESQL HEROKU_POSTGRESQL_OLIVE_URL: postgres://
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up deploy django mysql on heroku not working. Should I http://stackoverflow.com/questions/13620051/heroku-push-of-django-app-gets-no-module-named-psycopg2-extensions/13620465 try amazon EB? up vote 1 down vote favorite I've spent a solid week trying to deploy an Django app on Heroku from my mac osx. I went through series of trial and error and finally came to the conclusion that I should just give up. By way of background, I am using bitbucket, and mysql. I read that Heroku was easy to use and most django developers http://stackoverflow.com/questions/22428017/deploy-django-mysql-on-heroku-not-working-should-i-try-amazon-eb suggested that a beginner like myself should use Heroku and Amazon S3. So I took that advice and started deploying my django polls app on Heroku. I later found out that Heroku works well with PosgreSQL but there were hardly any docs on how to make it work with mysql. I ran into trouble from the start with uploading my app and ignoring changing the database setting in my settings.py file. I was hoping maybe it will just work :) But sadly that was not the case and So I decided to change my database from mysql to PosgreSQL by installing PosgreSQL (which I am not familiar with) and that did not fix my problem. I tried installing postgresql-9.3.3-1-osx at http://www.enterprisedb.com/products-services-training/pgdownload#osx But I still could not deploy: raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e) django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named psycopg2 So I tried installing psycopg2 and it gave me more errors about pg-config: Command python setup.py egg_info failed with error code 1 in /private/var/folders/m3/_ymmjf2s74g9fvx44dysy_v80000gn/T/pip_build_vantran/psycopg2 Storing debug log for failure in /Users/vantran/.pip/pip.log So to sum this up, I've given up hope of using Heroku. I must believe that there are loads of people out there who have similar situa
here for a quick overview of the site Help Center Detailed answers http://stackoverflow.com/questions/30975904/django-1-8-psycopg2-import-error to any questions you might have Meta Discuss the workings http://serverfault.com/questions/619879/psycopg2-not-found-by-django-after-installing-in-virtualenv and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack no module Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Django 1.8 psycopg2 import error up vote 0 down vote favorite I have psycopg2 installed on my computer under C:\Python34\Lib\site-packages\psycopg2 If I use a no module named postgresql database in a django project outside a virtual environment, I get no error.But, when I want to transfer the project to a virtual env so that I can deploy it on heroku. But when I try to migrate the database I get an error saying psycopg2 module is not present. I even tried to install it inside the virtual env using pip install psycopg2 and even that didn't work. Here is the full traceback. (denv) C:\Users\Saket\denv\musicalguru>python manage.py migrate Traceback (most recent call last): File "C:\Users\Saket\denv\lib\site- packages\django\db\backends\postgresql_psycopg2\base.py", line 20, in
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top psycopg2 not found by django after installing in virtualenv up vote 5 down vote favorite 1 I want to use postgresql with django so did the following: sudo apt-get install libpq-dev python-dev sudo apt-get update workon myenv sudo pip install psycopg2 And after configuring my settings.py correctly, I run ./manage.py syncdb But an exception gets thrown: django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named psycopg2 The database configuration: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'mydb', 'USER': 'postgres', 'PASSWORD': 'password1234', 'HOST': 'localhost', 'PORT': '', } } postgresql django virtualenv share|improve this question edited Aug 14 '14 at 16:01 xofer 2,679518 asked Aug 12 '14 at 15:27 Joren 2816 Check permissions in the venv -- you installed w/ sudo. –xofer Aug 12 '14 at 15:39 Also can you confirm that you installed psycopg2 (and not psycpg2) with pip. –xofer Aug 12 '14 at 15:43 @xofer I did install psycopg2 –Joren Aug 12 '14 at 15:45 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote accepted Installing with sudo (sudo pip install ...) causes the installed files to be owned by root, and Django (run without sudo) cannot read them. You can sudo pip uninstall psycopg2 and then install without sudo. (If that doesn't work, try sudo chown -R $USER ~/.virtualenvs/myvenv first (assumes that's your virtualenv path). share|improve this answer answered Aug 14 '14 at 13:50 xofer 2,679518 2 you are my savior –Suoinguon Dec 16 '14 at 19:16 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged postgresql django virtualenv or ask your own