Code Monkey home page Code Monkey logo

Comments (2)

dvarrazzo avatar dvarrazzo commented on May 29, 2024 1

Hello, thank you for trying psycopg3 out.

Eventually psycopg3 should have a binary bundle but it hasn't been released yet. In your current install layout the "python" wrapper should be the one working. I see it isn't because it cannot find the libpq, which should be a file called libpq.dll distributed together with Postgres.

Could you locate that file? Could you try and copy it in a directory included in the PATH?

This is just to try things out, it is not the way installation is supposed to work, of course :)

This is where importing the library takes place and where the exception is raised:

https://github.com/psycopg/psycopg3/blob/956238bef739675d46d6e65c953c1dcef10a165e/psycopg3/psycopg3/pq/_pq_ctypes.py#L16-L21

maybe there is something broken there you could check out?

Thank you!

from psycopg.

Debianov avatar Debianov commented on May 29, 2024

Hello!

I managed to solve the problem. First, as You requested, I checked PATH. There were no paths leading to libpq. After adding dll to one of the directories located in the PATH variable the process of importing the library did not go beyond 23 line in _pq_ctypes:

pq = ctypes.cdll.LoadLibrary(libname)

The error said about dependencies:

Could not find module 'D:\Microsoft VS Code\bin\libpq.dll' (or one of its dependencies). Try using the full path with constructor syntax.

In the end, I started checking dependencies. Some of the dependent libraries were in the PostreSQL libraries folder. As a result, I had to add the path to PostreSQL/Lib in PATH variable.

In conclusion, I would like to say that it would be nice to add this moment to the library documentation.

Thank you!

from psycopg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.