Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9165333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:53:06+00:00 2026-06-17T14:53:06+00:00

OpenBSD, PostgreSQL9.2, python2.7 Trying to import psycopg2 module from python command line: Python 2.7.3

  • 0

OpenBSD, PostgreSQL9.2, python2.7
Trying to import psycopg2 module from python command line:

Python 2.7.3 (default, Aug  3 2012, 05:33:56)
[GCC 4.2.1 20070719 ] on openbsd5
Type "help", "copyright", "credits" or "license" for more information.
>>> import psycopg2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/psycopg2/__init__.py", line 67, in <module>
    from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: Cannot load specified object

psycopg2 is compiled and installed. I saw _psycopg.so in /site-packages/psycopg2 folder. Maybe he can not see this library ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T14:53:07+00:00Added an answer on June 17, 2026 at 2:53 pm

    The psycopg2 python module includes an extension written in C. That extension cannot be loaded, because another C library that it is depending on is missing.

    Check that you still have the PostgreSQL client libraries installed, and that psycopg2 can find it.

    Note that if you run Django in a WSGI server, you need to have set the LD_LIBRARY_PATH environment variable before the WSGI server starts. Alternatively, recompile the psycopg2 extension with LD_RUN_PATH=/usr/local/pgsql/lib to ‘hardcode’ the path to the PostgreSQL client library at linking time, removing the need to set LD_LIBRARY_PATH.

    A last resort would be to add the /usr/local/pgsql/lib path to /etc/ld.so.conf, see the ld.so(8) manpage.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I have a problem with compiling a ghostscript from ports in openbsd 4.7.
At openBSD we have the command: sudo sysctl kern.bufcachepercent This sets the percent of
Has anyone been able to get xinc to run correctly under OpenBSD's chrooted default
I'm having issues connecting to a sql server database from an openbsd box using
I would like to use OpenBSD's implementation of malloc, realloc and free on my
Once when I got my hand on openbsd I was really happy to have
I'm trying to write a semi-portable threading class for a project I'm working on,
Has anyone gotten VisualWorks running under OpenBSD? It's not an officially supported platform, but
I'm trying to get the exit code of a subprocess. On Linux and FreeBSD
We have a c file called dbookpy.c, which will provide a Python binding some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.