Re: Installing on Mac OS X
"Charlie Clark" <[email protected]> Sun, 25 Apr 2010 12:27:22 +0200
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
Off-list replies not helping here. > Yeah, turns out I'm picking up Apple's crappy built-in python. Haven't > been able to figure out where it's making it into my path yet... >> > [email protected][6:49]~/src:79%sudo port install py26-psycopg2 >> +postgresql83 >> > ---> Computing dependencies for py26-psycopg2 >> > ---> Fetching py26-psycopg2 >> > ---> Verifying checksum(s) for py26-psycopg2 >> > ---> Extracting py26-psycopg2 >> > ---> Applying patches to py26-psycopg2 >> > ---> Configuring py26-psycopg2 >> > ---> Building py26-psycopg2 >> > ---> Staging py26-psycopg2 into destroot >> > ---> Installing py26-psycopg2 @2.0.14_0+postgresql83 >> > ---> Activating py26-psycopg2 @2.0.14_0+postgresql83 >> > ---> Cleaning py26-psycopg2 >> > [email protected][6:49]~/src:80%python >> > Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) >> > [GCC 4.2.1 (Apple Inc. build 5646)] on darwin >> > Type "help", "copyright", "credits" or "license" for more information. >> > >>> import psycopg2 >> > Traceback (most recent call last): >> > File "<stdin>", line 1, in <module> >> > File "build/bdist.macosx-10.6-universal/egg/psycopg2/__init__.py", >> line 69, in <module> >> > File "build/bdist.macosx-10.6-universal/egg/psycopg2/_psycopg.py", >> line 7, in <module> >> > File "build/bdist.macosx-10.6-universal/egg/psycopg2/_psycopg.py", >> line 6, in __bootstrap__ >> > ImportError: >> dlopen(/Users/decibel/.python-eggs/psycopg2-2.0.14-py2.6-macosx-10.6-universal.egg-tmp/psycopg2/_psycopg.so, >> 2): Symbol not found: _PQbackendPID >> > Referenced from: >> /Users/decibel/.python-eggs/psycopg2-2.0.14-py2.6-macosx-10.6-universal.egg-tmp/psycopg2/_psycopg.so >> > Expected in: flat namespace >> > in >> /Users/decibel/.python-eggs/psycopg2-2.0.14-py2.6-macosx-10.6-universal.egg-tmp/psycopg2/_psycopg.so >> > >>> ^D >> > >> > What's up with the ~/.python-eggs directory?? >> >> Did you do a local install into your home dir or a global one ? >> >> Perhaps you have an old leftover install of psycopg2 in your home dir >> which gets picked up by error ? Yep, looks like you've got a nasty mix of installations. Try avoid using easy_install for global installs rm -rf ~/.python-eggs Check which version of Python 2.6 is actually active by following which python To see whether you're still using Apple's botched version or the MacPorts one Use sudo port install python_select To give MacPorts control over your Python version. You should then be able to use psycopg2 without any problems as you installed it okay. Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 _______________________________________________ Psycopg mailing list [email protected] http://lists.initd.org/mailman/listinfo/psycopg