GithubHelp home page GithubHelp logo

Comments (10)

brettkromkamp avatar brettkromkamp commented on May 10, 2024 1

@machawk1 Yes, I agree. And, dockerizing Contextualise (#2) becomes very attractive.

from contextualise.

brettkromkamp avatar brettkromkamp commented on May 10, 2024

Okay, I need to take a closer look at this. Not too long ago I remember switching from psycopg2-binary to psycopg2. Personally, I didn't encounter any problems related to the switch but that might be due to the state of my development environment. I'll try setting up Contextualise from scratch in a clean environment... see if I can replicate the issue.

from contextualise.

machawk1 avatar machawk1 commented on May 10, 2024

@brettkromkamp That was my intention with using virtualenv, to ensure the state of the install was fresh. Can you pip freeze on a machine where you have it working so I can see some version info for psycopg that you know works with contextualise?

from contextualise.

brettkromkamp avatar brettkromkamp commented on May 10, 2024

contextualise-requirements.txt

There is some superfluous stuff in there.

from contextualise.

machawk1 avatar machawk1 commented on May 10, 2024

Thanks for the info, @brettkromkamp. pip3 install psycopg2-binary installs version 2.8.3 but the contextualise install procedure looks to build and install psycopg2 from source, which has some further dependencies.

Dockerizing contextualise (#2) would help with this, particularly if postgresql is also needed. I did not see psycopg2 in the requirements.txt or setup.py. Can you supply some info on the dependency chain needing psycopg2 and whether it would be feasible for contextualise to use the psycopg2 binary (which would drastically reduce this installation barrier)?

from contextualise.

brettkromkamp avatar brettkromkamp commented on May 10, 2024

@machawk1 Contextualise can probably revert to using the psycopg2-binary package instead of psycopg2. I really just switched because at the time, if I remember correctly, it was advised to use the package built from sources if in production.

I don't specify psycopg2 in requirements.txt or setup.py because TopicDB (the topics map engine on top of which Contextualise is built) already requires it.

As mentioned, Contextualise depends on TopicDB which in turn depends on TypedTree (another project of mine). It is TopicDB that depends on psycopg2.

from contextualise.

brettkromkamp avatar brettkromkamp commented on May 10, 2024

@machawk1 So, back to the psycopg2 vs. psycopg2-binary issue... the psycopg2 documentation explicitly states that "if you are the maintainer of a publish package depending on psycopg2 you shouldn’t use ‘psycopg2-binary’ as a module dependency". So, if I am interpreting that correctly, TopicDB should not be using psycopg2-binary as a dependency and instead use the psycopg2 package (as it does, currently). I will continue to look into this issue to see what is the best way forward.

from contextualise.

machawk1 avatar machawk1 commented on May 10, 2024

@brettkromkamp Your interpretation seems correct -- psycopg2 wants you to build from source it seems, which currently breaks contextualise w/o further dependency specification.

from contextualise.

brettkromkamp avatar brettkromkamp commented on May 10, 2024

@machawk1 Yes, that is what it looks like. Building psycopg2 from source requires the following build prerequisites: http://initd.org/psycopg/docs/install.html#build-prerequisites

from contextualise.

machawk1 avatar machawk1 commented on May 10, 2024

@brettkromkamp That seems like a lot of overhead for a dependency. Despite this, contextualise may want to either describe how to accomplish it or provide some automated hooks in the build process.

When projects state, "Go to this other web page to install this dependency that you have to build from source", it might tend to scare potential users away. Automating this down to the contextualise install will ensure building psycopg2 is less of a barrier.

from contextualise.

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.