Issues with importing psycopg2

This is the place for queries that don't fit in any of the other categories.

Issues with importing psycopg2

Postby vessilli » Tue Jul 09, 2013 8:43 pm

I am running EPD python 2.7.3. I have installed psycopg2 by easy_install . But When i try to import the psycopg2, It shows the following error:
Code: Select all
Enthought Python Distribution (EPD) free version -- www.enthought.com
Version: 7.3-2 (32-bit)
(type 'upgrade' or see www.enthought.com/epd/upgrade to get the full EPD)

Python 2.7.3 |EPD_free 7.3-2 (32-bit)| (default, Apr 12 2012, 11:28:34)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "credits", "demo" or "enthought" for more information.
>>> import psycopg2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/psycopg2/__init__.py", line 50, in <module>
    from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Symbol not found: _PQbackendPID
  Referenced from: /Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/psycopg2/_psycopg.so
  Expected in: dynamic lookup




I am runnin mac osx Mountain lion. I need you suggestion.
vessilli
 
Posts: 3
Joined: Tue Jul 09, 2013 8:40 pm

Re: Issues with importing psycopg2

Postby micseydel » Wed Jul 10, 2013 1:37 am

Back when I was using Snow Leopard, I determined that trying to get third party Python modules working in OS X isn't worth it. I know this isn't a solution to your problem, and is instead a workaround, but I'd recommend forgetting about OS X and installing Linux or setting up a VM, such as with VirtualBox.

If you do solve your problem, we here at this forum would greatly appreciate you posting your solution though!
Join the #python-forum IRC channel on irc.freenode.net!
User avatar
micseydel
 
Posts: 941
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: Issues with importing psycopg2

Postby vessilli » Wed Jul 10, 2013 10:25 am

Thank you "micseydel" for your suggestion. I have solved it. Problem was I was running 32 bit EPD python distribution on 64 bit OS. I have Installed Canopy 64 bit and this has been solved.
vessilli
 
Posts: 3
Joined: Tue Jul 09, 2013 8:40 pm

Re: Issues with importing psycopg2

Postby micseydel » Wed Jul 10, 2013 7:20 pm

Thanks for posting back!
Join the #python-forum IRC channel on irc.freenode.net!
User avatar
micseydel
 
Posts: 941
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA


Return to General Coding Help

Who is online

Users browsing this forum: Bing [Bot] and 1 guest