Tried homebrew - this was a response to another reply Thomas. brew update
Here I tried: brew install postgresql but had this error Error: Failed executing: make install-world (postgresql.rb:67) So instead I did this: brew install postgres --no-ossp-uuid --no-python --no-rubie Then when running python manage.py runserver I got this error mentioned first: Symbol not found: _PQbackendPID In my virtual env I did not install python, it used my mac installation, that is correct. However from the nature of the error it did not look like it relates to python. In my settings.py I followed Heroku instructions and put this for the database: import dj_database_url DATABASES = {'default': dj_database_url.config(default='postgres://localhost')} Here are some details on my virtual env: That's the structure, without all the files of course: venv/lib/python2.7/warnings.pyc venv/include/python2.7/unicodeobject.h venv/include/python2.7/metagrammar.h .... venv/lib/python2.7/site-packages: setuptools.pth pip-1.1-py2.7.egg dj_database_url.pyc distribute-0.6.24-py2.7.egg psycopg2-2.4.5-py2.7.egg-info easy-install.pth dj_database_url.py Django-1.4-py2.7.egg-info psycopg2 django dj_database_url-0.2.0-py2.7.egg-info venv/lib/python2.7/lib-dynload: zlib.so fcntl.so _scproxy.so _codecs_jp.so _Help.so unicodedata.so dl.so _random.so _codecs_iso2022.so . .... venv/lib/python2.7/encodings: zlib_codec.pyo shift_jis_2004.pyc mac_croatian.py iso8859_13.pyo gb18030.pyc cp860.py cp1253.pyo ..... venv/lib/python2.7/distutils: distutils.cfg __init__.pyc __init__.py venv/lib/python2.7/config: python.o libpython2.7.dylib install-sh config.c Setup.config Makefile makesetup libpython2.7.a config.c.in Setup.local Setup Not sure if these are the details that can help. Moshe On Sunday, July 18, 2010 5:06:58 PM UTC-7, daniel.franca wrote: > > Recently I migrated from Linux to Mac OS X 10.6, and I was thinking that > would be easy to migrate my Django project to that. > I was wrong, a lot wrong... > First I tried to install Python2.7, the libs I need to my project, etc > After that I get the error: > *gresql_psycopg2/base.py", line 24, in <module>* > * raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)* > *django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 > module: > dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so, > > 2): Symbol not found: _PQbackendPID* > * Referenced from: > /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so > * > * Expected in: flat namespace* > * in > /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so > * > * > * > After some research I saw some suggestions, one of them was to download > and install everything from Ports. But it didn't work for me too: > > :info:configure configure: error: library 'xml2' (version >= 2.6.23) is > required for XML support > :info:configure shell command " cd > "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_postgresql84/work/postgresql-8.4.4" > > && ./configure --prefix=/opt/local --disable-dependency-tracking > --sysconfdir=/opt/local/etc/postgresql84 > --bindir=/opt/local/lib/postgresql84/bin > --libdir=/opt/local/lib/postgresql84 > --includedir=/opt/local/include/postgresql84 > --datadir=/opt/local/share/postgresql84 --mandir=/opt/local/share/man > --without-docdir --with-includes=/opt/local/include > --with-libraries=/opt/local/lib --with-openssl --with-bonjour > --with-readline --with-zlib --with-libxml --with-libxslt > --enable-thread-safety --enable-integer-datetimes --with-ossp-uuid " > returned error 1 > :error:configure Target org.macports.configure returned: configure > failure: shell command failed > > But libxml2.7 was there, what I did? I tried to remove it and install > again, but when I tried to reinstall it I get another error: > > Error: You cannot install libxml2 for the architecture(s) x86_64 i386 > because > > Error: its dependency libiconv only contains the architecture(s) i386 ppc. > > I tried install psycopg2 using easy_install... everything looks fine, but > when I try to run my project, same error before. > > Another suggestion I found was to run python in 32 bits mode. > > I did a little test: > > "arch -i386 pyhon -c 'import psycopg2' > > It seems to work, but when I ran my project the error is still there, > tried to change de env variable: > > defaults write com.apple.versioner.python Prefer-32-Bit -bool yes > > no success yet. > > So I gave up of Python2.7 and back to Python2.5 tried to install > everything again. > > and it's not even recognize Django: > > Traceback (most recent call last): > File "./manage.py", line 11, in <module> > from django.conf import settings > ImportError: No module named django.conf > > The libs are here: > python -c "from distutils.sysconfig import get_python_lib; print > get_python_lib()" > > /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages > > ls > /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages > Django-1.2.1-py2.5.egg-info django_extensions-0.5-py2.5.egg-info psycopg2 > PIL django_pagination-1.0.7-py2.5.egg psycopg2-2.2.2-py2.5.egg-info > PIL.pth django_robots-0.8.0-py2.5.egg pytz-2010h-py2.5.egg > South-0.7.1-py2.5.egg django_tagging-0.3.1-py2.5.egg-info > setuptools-0.6c11-py2.5.egg > django django_timezones-0.1.4-py2.5.egg setuptools.pth > django_db_log-2.0.0-py2.5.egg easy-install.pth tagging > django_dbtemplates-0.7.1-py2.5.egg include_server > django_extensions include_server-3.1_toolwhip.1-py2.5.egg-info > > python --version > Python 2.5.4 > > Best Regards, > > Daniel França > > > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/ju4DlhC_on0J. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.