Django Error Loading Psycopg Module
Contents |
here for a quick overview of the site Help Center django core exceptions improperlyconfigured error loading psycopg2 module no module named psycopg2 Detailed answers to any questions you might have Meta Discuss
Error Loading Psycopg2 Module S E
the workings and policies of this site About Us Learn more about Stack Overflow error loading psycopg2 module dlopen the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x
Error Loading Psycopg2 Module Dll Load Failed
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 Django/Python Beginner: Error when executing python manage.py syncdb - psycopg2 not found up vote 21 down vote favorite no module named psycopg2 django 7 I have Pythong2.6, psycopg2 and 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
Error Loading Psycopg2 Module: No Module Named Psycopg2 Mac
Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs
No Module Named Psycopg2 Windows
Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just django.core.exceptions.improperlyconfigured: error loading psycopg2 like you, helping each other. Join them; it only takes a minute: Sign up Error: No module named psycopg2.extensions up vote 37 down vote favorite 14 I am trying to set up a PostgreSQL database for my http://stackoverflow.com/questions/1383126/django-python-beginner-error-when-executing-python-manage-py-syncdb-psycopg2 django project, which 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 http://stackoverflow.com/questions/12728004/error-no-module-named-psycopg2-extensions can't seem to find a way 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 3393614 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 96 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 pr
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 http://serverfault.com/questions/619879/psycopg2-not-found-by-django-after-installing-in-virtualenv Us Learn more about Stack Overflow the company Business Learn more about hiring http://djbook.ru/forum/topic/2647/ 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 error loading 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 error loading psycopg 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 disc
ORM Разное Формы Основы Админка Декораторы Python Django CMS Архив Миграции Jobs О проекте Join Gitter Django на русском Sparse is better than dense. Разработка на Python / Python & Django / Django 1.7 Python 3.4 Postgresql 9.3 psycopg2 error Ответ 14 Окт. 2014, 1:39 Runnko Отклики: 46 14 Окт. 2014, 1:39 Runnko Отклики: 46 Всем привет, уже второй или третий день мучаюсь с некой проблемой: Хотел развернуть Джанго 1.7 с питоном 3.4 и использовать при этом postgresql всё это соответственно в виртуальном окружении virtualenv. Взял этот туториал http://habrahabr.ru/post/181556/ и дойдя до первого использования python manage.py sycndb Получил следующий результат: runnko@RunnkoPC:~/Web/virtualenv/mysite$ python3 manage.py syncdb Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/django/db/backends/postgresql_psycopg2/base.py", line 23, in