Django Error Loading Psycopg2 Module Can Import Mx Datetime Module
Contents |
here for a quick overview of the site improperlyconfigured: error loading psycopg2 module: no module named psycopg2 Help Center Detailed answers to any questions you might have
Django Core Exceptions Improperlyconfigured Error Loading Psycopg2 Module
Meta Discuss the workings and policies of this site About Us Learn more about
Error While Running '$ Python Manage.py Collectstatic --noinput'.
Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges
Failed Building Wheel For Psycopg2
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 Django/Python Beginner: Error when executing python manage.py syncdb - psycopg2 not found up ./psycopg/psycopg.h:30:20: fatal error: python.h: no such file or directory vote 21 down vote favorite 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
Dansk Deutsch English English UK Español Filipino Français Hrvatski Italiano Magyar Norsk Polski Português Română Slovenčina Suomi Svenska Tiếng Việt Türkçe command python setup.py egg_info failed with error code 1 psycopg2 Ελληνικά Български език Русский Српски Українська мова עִבְרִית العربية no module named psycopg2 mac فارسی मराठी हिन्दी বাংলা ગુજરાતી தமிழ் ಕನ್ನಡ ภาษาไทย 한국어 日本語 简体中文 繁體中文 Heb je error: pg_config executable not found. al een account? Inloggen Heb je al een account? Ingelogd blijven · Wachtwoord vergeten? Nieuw op Twitter? Registreren Door de services van Twitter http://stackoverflow.com/questions/1383126/django-python-beginner-error-when-executing-python-manage-py-syncdb-psycopg2 te gebruiken, ga je akkoord met ons beleid voor cookiegebruik en gegevensoverdracht buiten de EU. Wij en onze partners zijn wereldwijd actief en gebruiken cookies, onder andere voor analyses, personalisatie en advertenties. Sluiten Profiel van mgedmin Marius Gedminas @mgedmin Marius Gedminas @mgedmin Programmer geek (he/him). Tries to https://twitter.com/mgedmin/status/385469588764237825 balance rants about software bugs with positive tweets. Lazy feminist. Loves cats and GNOME 3. Geregistreerd in juli 2009 © 2016 Twitter Over Help Voorwaarden Privacy Cookies Advertentie-informatie Verbergen Sluiten Vorige Volgende Sluiten Naar het profiel van een persoon gaan Opgeslagen zoekopdrachten Verwijderen Geverifieerd account @ Voorgestelde gebruikers Geverifieerd account @ Geverifieerd account @ Sluiten Wil je dit naar je volgers retweeten? Optionele reactie voor Retweet Opgeslagen zoekopdrachten Verwijderen Geverifieerd account @ Voorgestelde gebruikers Geverifieerd account @ Geverifieerd account @ 140 Retweeten Tweeten Sluiten Weet je zeker dat je deze Tweet wilt verwijderen? Annuleren Verwijderen Sluiten Deze Tweet uitlichten Sluiten Blokkeren Annuleren Blokkeren Een locatie toevoegen aan mijn Tweets Als je je locatie meestuurt met een Tweet, zal Twitter deze opslaan. Je kunt de locatie aan-/uitzetten voor het plaatsen van elke Tweet en je hebt altij
psycopg2 package is the current mature implementation of the adapter: it is a C extension and as such it is only compatible with CPython. If you want to use Psycopg http://initd.org/psycopg/docs/install.html on a different Python implementation (PyPy, Jython, IronPython) there is an experimental porting of https://github.com/CasualGaming/studlan/blob/master/README.postgres.md Psycopg for Ctypes, but it is not as mature as the C implementation yet. The current psycopg2 implementation supports: Python 2 versions from 2.5 to 2.7 Python 3 versions from 3.1 to 3.5 PostgreSQL versions from 7.4 to 9.5 Note psycopg2 usually depends at runtime on the libpq dynamic library. However error loading it can connect to PostgreSQL servers of any supported version, independently of the version of the libpq used: just install the most recent libpq version or the most practical, without trying to match it to the version of the PostgreSQL server you will have to connect to. Installation¶ If possible, and usually it is, please install Psycopg from a package available for your distribution or operating error loading psycopg2 system. Compiling from source is a very easy task, however psycopg2 is a C extension module and as such it requires a few more things in place respect to a pure Python module. So, if you don't have experience compiling Python extension packages, above all if you are a Windows or a Mac OS user, please use a pre-compiled package and go straight to the module usage avoid bothering with the gory details. Note Regardless of the way psycopg2 is installed, at runtime it will need to use the libpq library. psycopg2 relies on the host OS to find the library file (usually libpq.so or libpq.dll): if the library is installed in a standard location there is usually no problem; if the library is in a non-standard location you will have to tell somehow psycopg how to find it, which is OS-dependent (for instance setting a suitable LD_LIBRARY_PATH on Linux). Install from a package¶ Linux Psycopg is available already packaged in many Linux distributions: look for a package such as python-psycopg2 using the package manager of your choice. On Debian, Ubuntu and other deb-based distributions you should just need: sudo apt-get
Sign in Pricing Blog Support Search GitHub This repository Watch 3 Star 6 Fork 2 CasualGaming/studlan Code Issues 9 Pull requests 1 Projects 0 Wiki Pulse Graphs Permalink Branch: master Switch branches/tags Branches Tags master Nothing to show v1.3.4 v1.3.3 v1.3.2 v1.3.1 v1.3 v1.2.1 v1.2 v1.1.1 v1.1 v1.0rc1 studlan2013.02 studlan2013.02_v2 studlan2012.10 1.3.8 1.3.7 1.3.6 1.3.5 Nothing to show Find file Copy path studlan/README.postgres.md Fetching contributors… Cannot retrieve contributors at this time Raw Blame History 28 lines (14 sloc) 1.12 KB Studlan README.postgres Install notes if you want to use Postgresql when deploying Studlan. Basic for any install apt-get build-dep python-psycopg2 (non Debian/Ubuntu need to fix headers for psycopg2 python bindings and postgresql themself!) source virtualenv (which is a «virtualenv --no-site-packages») pip install egenix-mx-base (fixes: django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: can't import mx.DateTime module for Django version < 1.4. Not bad to have for latest django either ...) Django 1.4>= pip install psycopg2 Django Django1.3 or less TODO: Figure out how to pass "-I/virtualenv/full/path/site-packages/mx" so psycopg2 builds postgres python adapter with bindings from egenix-mx-base (mx.DateTime) in our virtualenv. WARNING: Wont work before TODO fixed for Django1.3... be free to figure it out or just be a good boy and use lateast Django 1.4! DOH: Shouldn't really care about this issue as it is Django 1.2 in Debian Squeeze (current stable) and Debian Wheezy which is next stable will have Django 1.4 anyway! pip install psycopg2==2.4.1 Jump to Line Go Contact GitHub API Training Shop Blog About © 2016 GitHub, Inc. Terms Privacy Security Status Help You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.