Django Error Loading Psycopg
Contents |
here for a quick overview of the site Help Center Detailed answers python psycopg to any questions you might have Meta Discuss the workings psycopg python 3 and policies of this site About Us Learn more about Stack Overflow the company Business django psycopg2 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 django psycopg2 pool 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/Python Beginner: Error when executing python manage.py syncdb - psycopg2 not found up vote 21 down vote favorite 7 I have Pythong2.6, psycopg2 and
Django Postgresql
pgAdmin3 installed using Macports. My settings.py is: DATABASE_ENGINE = 'postgresql_psycopg2' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. DATABASE_NAME = 'mysite' # Or path to database file if using sqlite3. DATABASE_USER = 'postgres' # Not used with sqlite3. DATABASE_PASSWORD = '' # Not used with sqlite3. DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. The error I get when I run python manage.py syncdb is: Traceback (most recent call last): File "manage.py", line 11, in
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
Django Error Loading Psycopg2 Module: No Module Named 'psycopg2'
about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users error loading psycopg2 module: no module named psycopg2 mac Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping django.core.exceptions.improperlyconfigured: error loading psycopg2 each other. Join them; it only takes a minute: Sign up django.core.exceptions.ImproperlyConfigured: Error loading psycopg module: No module named psycopg up vote 14 down vote favorite 2 Presently, I'm attempting to configure Django for use on a project, http://stackoverflow.com/questions/1383126/django-python-beginner-error-when-executing-python-manage-py-syncdb-psycopg2 and am encountering a persistent error when I try to run python manage.py syncdb. File "/x/x/x/x/x/x/base.py", line 23, in ? raise ImproperlyConfigured("Error loading psycopg module: %s" % e) django.core.exceptions.ImproperlyConfigured: Error loading psycopg module: No module named psycopg The other discussions of a similar problem that I have found both here and on other sites ended up being solved by the user downloading and installing psycopg, but unless I'm missing something critical, I've done that several times. I http://stackoverflow.com/questions/8237842/django-core-exceptions-improperlyconfigured-error-loading-psycopg-module-no-mo downloaded the tarball, unpacked it on my server, ran python setup.py build and python setup.py install with a --prefix directing it to my existing Python Path...I can go and navigate to the folder and see the various psycopg files, but for whatever reason, when I try to get my new project to sync up with the database, it cannot find psycopg and, as a result, won't talk to the db. Notes: hostmonster.com account, have tried multiple release versions of psycopg2. python django module psycopg2 django-manage.py share|improve this question asked Nov 23 '11 at 5:49 user968270 93129 This issue has been solved. After installing a current version of Python, the whole process went very smoothly and quickly for me. Thank you, s. zakharov for your assistance. –user968270 Nov 23 '11 at 7:39 add a comment| 4 Answers 4 active oldest votes up vote 11 down vote I had the error as well; although psycopg2 was installed on my system using apt-get, my virtualenv couldn't find it: >>> import psycopg2 Traceback (most recent call last): File "
Sign in Pricing Blog Support Search GitHub https://github.com/django-oscar/django-oscar/issues/1523 This repository Watch 214 Star 2,176 Fork 877 django-oscar/django-oscar Code Issues 208 Pull requests 71 Projects 0 Wiki Pulse http://www.marinamele.com/taskbuster-django-tutorial/install-and-configure-posgresql-for-django Graphs New issue django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named 'psycopg2._psycopg' #1523 Closed alfared opened this Issue Oct 16, 2014 error loading · 1 comment Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 3 participants alfared commented Oct 16, 2014 Hello. I had such a issue. When i building the demo site (oscar) $ make demo error loading psycopg (oscar) $ sites/demo/manage.py runserver I retrieved next exceptions Happy hacking! ================================================================================== # Install additional requirements pip install -r requirements_demo.txt bla bla bla # Create database # Breaks on Travis because of https://github.com/django-extensions/django-extensions/issues/489 if [ -z "" ]; then sites/demo/manage.py reset_db --router=default --noinput; fi Traceback (most recent call last): File "/opt/django-oscar/oscar/lib/python3.4/site-packages/Django-1.7-py3.4.egg/django/db/backends/postgresql_psycopg2/base.py", line 23, in
our project. In this part of the tutorial we will cover PostgreSQL, and in part VII.b we will cover MySQL. Feel free to choose whichever you want! 🙂 However, keep in mind that in a later part of this tutorial we will deploy our app in Heroku, and we will use PostgreSQL. So if you don't know which database to configure, I would recommend PostgreSQL 😉 The outline of this part is the following: Install PostgreSQL Create a PostgreSQL Database Install the PostgreSQL Django adapter, psycopg2 Configure the Django Database Settings Let's start! 🙂 Install PostgreSQL In my case I have Mac OS X, (Mountain Lion and/or Yosemite), and I used the Graphical Installer, recommended on the download page of PostgreSQL. It includes PostgreSQL, pgAdmin and the StackBuilder utility, for installation of additional packages. During the installation process, you will need to set a password for the database superuser account (on Postgres). Next, try to run $ pg_config 1 $ pg_config If you get a not found error, you will need to first find the path of this command with: $ sudo find / -name pg_config 1 $ sudo find / -name pg_config This should be something like /Library/PostgreSQL/9.3/bin. You need to add it to the $PATH variable, so open the .bash_profile file and add the line: export PATH=/Library/PostgreSQL/9.3/bin:$PATH 1 export PATH=/Library/PostgreSQL/9.3/bin:$PATH Restart your terminal and try again to type pg_config. Hopefully it will work 😉 Create a PostgreSQL Database On mac, the command $ which psql 1 $ which psql should point to the Postgres app. And this other command should start the Postgres command line utility: $ psql -h localhost 1 $ psql -h localhost If this command rises an error like psql: FATAL: password authentication falied for user "username", and you're sure you have entered your password correctly, you have to enter psql using the postgres user: $sudo -u postgres psql 1 $sudo -u postgres psql On the other hand, if you get an error like psql: FATAL: database