When I try and run django, this is what I get:
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python manage.py runserver 8000
Error: No module named psycopg2.extensions
Process finished with exit code 1
I've found other questions with similar problems but none on a mac and none with solutions that help. I get no other errors and I installed psycopg2. Im working in PyCharm. This is my setting file (or the top part of it at least).
ADMINS = (
# ('Your Name', '[email protected]'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '---', # Or path to database file if using sqlite3.
'USER': '---', # Not used with sqlite3.
'PASSWORD': '---', # Not used with sqlite3.
'HOST': 'www.-----.com', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}
As you can see in the source code, Django makes havy use of psycopg2.extensions module. Further, the extensions module is oficially contained in psycopg2. So, what I think is that you have installed psycopg the wrong way.
Here's the right location of the install page: http://initd.org/psycopg/install/
I recommend you to use virtualenv
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With