Giter VIP home page Giter VIP logo

Comments (5)

bjodah avatar bjodah commented on June 18, 2024

@arghdos, thank you for your thorough feedback on the installation issues. Right now for installation using pip I've taken an "all or nothing" approach (where pip install pyodesys installs the bare minimum and pip install pyodesys[all] installs everything). The original reason for this was that the 3rd party libraries were not always easily accessible on windows (or even OS X) until recently (now they are all available for all platforms via conda).

Arguably I could extend what the "bare minimum" is (e.g. have it include also sympy, scipy, matplotlib & pytest) for pyodesys. Then a basic "pip-install" of the package will be more useful. That would also lead to fewer skipped tests due to missing imports (maybe I should also instruct the user to pass the -rs flag to pytest?). Do you think that would be an improvement?

  • 1/2) I'll add an "Optional dependencies" subsection to the installation section. I'll also add a note about what 3rd party libraries those include (sundials 2.7.0/gsl >=1.16/boost >=1.65.0) for pycvodes/pygslodeiv2/pyodeint respectively), in addition I can add the required package names in e.g. debian/ubuntu.

  • 3) I could add a link to a binder (which would use a Dockerimage)? That would then serve both as an example of setup as well as an easy way for prospect users to explore the package.

from pyodesys.

skyreflectedinmirrors avatar skyreflectedinmirrors commented on June 18, 2024

@bjodah Ok, that helped a lot (the sundials version in particular was a hangup for me, as by default conda installs 3.x.x). Additionally, the -rs option is also helpful as it lists some other packages that might be missing in the setup dependencies (or possibly sub-dependencies?) --symcxx, quantities, symengine (and matplotlib, but it looks like you fixed that already).

The docker image is a great idea as well! Particularly for complicated mixed python / c packages I think it's critical to make the installation as well explained as possible, it's very easy (as we're showing here!) for small details to result in broken installs. Also an entry point into exploring the package / examples would be excellent.

I still end up with failed tests however). It appears to be only for tests that require pycompilation or pycodeexport. g++ --version on this system reports:

g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

which as far as I can tell should support c++14 as required for these examples, any thoughts here?

from pyodesys.

bjodah avatar bjodah commented on June 18, 2024

@arghdos thanks.

g++5.4 is new enough (that's the version I use myself). Looking at your latest failed test log I see:

...
nvector/nvector_serial.h: No such file or directory

this suggests that sundials' headers are not installed in any of the default include directories. One way to work around that is setting e.g. CPLUS_INCLUDE_PATH=/path/to/sundials-2.7/include

Regarding sundials-2.7.0 vs. 3.x: yes, right now pycvodes only works with 2.7.0, they broke both API and ABI moving from 2.7.0 -> 3.x. It is "just" a matter of adding a bunch of #ifdef blocks to pycvodes, I will do so as soon as I find some time.

I have now added both an environment.yml file for use with binder (link in README) and a script for hosting a docker-based jupyter notebook with pip-installed dependencies (with instructions for how to host in README). That Dockerfile then also serves as an example of how to setup a system with the required 3rd party libraries (the Dockerfile is based on the current debian stable).

Regarding symcxx, quantities and python-symengine:
I added the first two to the pip-installed environment in the Dockerfile. I'd rather not add symengine to that list since their official way of installing is through conda. So any tests depending on symengine (currently there is 1 such test) will be skipped in the Docker environment (it is still being run on the CI server).

EDIT: symcxx support is really "beta", and it's an experimental package of mine and not "production ready" by any means.

from pyodesys.

skyreflectedinmirrors avatar skyreflectedinmirrors commented on June 18, 2024

...
nvector/nvector_serial.h: No such file or directory
this suggests that sundials' headers are not installed in any of the default include directories.

One way to work around that is setting e.g. CPLUS_INCLUDE_PATH=/path/to/sundials-2.7/include

Aaahhh, I had missed that in the noise of the log. I had gotten pycvode to install correctly previously by passing the miniconda directories to pip but it makes sense that it needs them at compile time as well. I'll give that a shot

from pyodesys.

skyreflectedinmirrors avatar skyreflectedinmirrors commented on June 18, 2024

@bjodah that did the trick (along with a LIBRARY_PATH to point the library search in the right direction). I'll give the docker a test as well, but I think this issue can be closed

from pyodesys.

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.