Error Loading Psycopg2 Module No Module Named Extensions
Contents |
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 django.core.exceptions.improperlyconfigured: error loading psycopg2 module: no module named psycopg2 more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags
Importerror No Module Named Psycopg2
Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, importerror no module named psycopg2 windows helping each other. Join them; it only takes a minute: Sign up Error: No module named psycopg2.extensions up vote 38 down vote favorite 15 I am trying to set up a PostgreSQL database for my django project, which
Importerror No Module Named Psycopg2 Mac
I believe I have done now thanks to the replies to my last question Problems setting up a postgreSQL database for a django project. I am now trying to run the command 'python manage.py runserver' in Terminal to get my localhost up but when I run the command, I see this response... Error: No module named psycopg2.extensions I'm not sure what this means - I have tried to download psycopg2 but can't seem to find a way no module named psycopg2 django to download psycopg2 using homebrew. I have tried easy_install, pip install and sudo but all return errors like this... Downloading http://www.psycopg.org/psycopg/tarballs/PSYCOPG-2-4/psycopg2-2.4.5.tar.gz Processing psycopg2-2.4.5.tar.gz Writing /tmp/easy_install-l7Qi62/psycopg2-2.4.5/setup.cfg Running psycopg2-2.4.5/setup.py -q bdist_egg --dist-dir /tmp/easy_install-l7Qi62/psycopg2-2.4.5/egg-dist-tmp-PBP5Ds no previously-included directories found matching 'doc/src/_build' unable to execute gcc-4.0: No such file or directory error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1 Any help on how to fix this would be very much appreciated! Thanks Jess (Sorry if this is a really simple problem to solve - this is my first django project) python django postgresql psycopg2 share|improve this question asked Oct 4 '12 at 13:08 Jess 3443614 You don't have a compiler installed, and you need one to build the psycopg2 package. If you can provide details about your operating system, people here can probably help you with that. –Ian Clelland Oct 4 '12 at 15:37 @IanClelland Thanks Ian. I'm on Mac OS X 10.6.8. I have homebrew installed if that helps. –Jess Oct 5 '12 at 16:04 add a comment| 10 Answers 10 active oldest votes up vote 97 down vote The first thing to do is to install the dependencies. sudo apt-get build-dep python-psycopg2 After that go inside your virtualenv and use pip install psycopg2 These two commands should solve the problem. share|improve this answer edited Jan 13 '13 at 22:48 AD7six 34.7k
here for a quick overview of the site Help Center Detailed answers
Importerror No Module Named Psycopg2 Ubuntu
to any questions you might have Meta Discuss the workings
No Module Named Psycopg2 Mac
and policies of this site About Us Learn more about Stack Overflow the company Business importerror no module named psycopg2 centos 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 http://stackoverflow.com/questions/12728004/error-no-module-named-psycopg2-extensions 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 runserver error (psycopg2) up vote 1 down vote favorite I'm trying to do this: python3.3 manage.py runserver In my Django project folder. I http://stackoverflow.com/questions/21516847/django-runserver-error-psycopg2 get this error message: File "/usr/local/lib/python3.3/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 25, 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 http://serverfault.com/questions/619879/psycopg2-not-found-by-django-after-installing-in-virtualenv 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 https://bugs.launchpad.net/bugs/480366 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 no module 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 no module named 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
Milestone Griffith Edit Fix Released Undecided Michael Edit You need to log in to change this bug's status. Affecting: Griffith Filed here by: Juan Simón When: 2009-11-10 Confirmed: 2009-11-18 Assigned: 2009-11-18 Started work: 2009-11-18 Completed: 2010-01-10 Target Distribution Baltix BOSS Juju Charms Collection Elbuntu Guadalinex Guadalinex Edu Kiwi Linux nUbuntu PLD Linux Tilix tuXlab Ubuntu Ubuntu Linaro Evaluation Build Ubuntu RTM Package (Find…) Project (Find…) Status Importance Fix Released Undecided Assigned to Me Michael (mikej06) Comment on this change (optional) Email me about changes to this bug report Also affects project (?) Also affects distribution/package Nominate for series Bug Description version 0.11~svn (revision 1319) I install svn version, I try to execute griffith but: Traceback (most recent call last): File "/usr/bin/griffith", line 1501, in