bertiniteam / b2

Bertini 2.0: The redevelopment of Bertini in C++.
93 stars 34 forks source link

ModuleNotFoundError: No module named '_pybertini' #171

Open jpcurbelo opened 1 year ago

jpcurbelo commented 1 year ago

I'm trying to install this package on Ubuntu 22.04. I got to the Python-bindings part. I'm getting the error below when running the tests

File "/home/jesus/.local/lib/python3.10/site-packages/pybertini/system/start_system/__init__.py", line 37, in <module> import _pybertini.system.start_system ModuleNotFoundError: No module named '_pybertini'

Anyone has found this error? Any idea why I'm getting this and how could I solve it? Many thanks! in advance

ofloveandhate commented 1 year ago

it's been a while since i've worked on this project, but i'm feeling it today. i'll see how far i can get on fixing it. thanks for including your OS info without me having to ask.

ofloveandhate commented 1 year ago

for context, #168 is another instance of someone getting this error. i was unable at that time to correct the bug. but i'm in a good mental place now to try to fix it. i bet it's minor. but i give the same caution I gave that person: this software is not mature, but experimental. i welcome users, but they should go in with open eyes.

i'm almost there on compiling so I can work on the actual bug you experienced.

ofloveandhate commented 1 year ago

indeed, i have replicated the bug

jpcurbelo commented 1 year ago

Hi @ofloveandhate. Thank you so much for trying to help with this. Fingers are crossed so you can find the cause and fix it. I look forward to using your code in my research. Thanks again!

ofloveandhate commented 1 year ago

I think this is caused by either:

I'm running into a problem building the python bindings using Boost 1.81 due to duplicate symbol 'boost::phoenix::placeholders::uarg1', which is a bug in Boost.Phoenix in this release of Boost.

ofloveandhate commented 1 year ago

@jpcurbelo are you looking for off-the-shelf correct implementations of Numerical Algebraic Geometry? Or looking to mess around with path tracking and programmatic polynomial system construction and solution?

jpcurbelo commented 1 year ago

Hi. Thank you so much for your efforts! I'm playing around with polynomial systems from the Runge Kutta equations for a given number of stages and order. I first found the Bertini.jl package but I wasn't able to install it (see the image). Then, I learned about your repo at the documentation and I thought it could be helpful.

I thank you again for all your work and would appreciate any tips and recommendations you might have to enlighten my search.

image

ofloveandhate commented 1 year ago

I can't help with the Julia stuff, sorry.

ofloveandhate commented 1 year ago

if you have the C++ part of the Bertini2 Python package installed, you need to make the installed pre-compiled library visible to Python using something like

export PYTHONPATH=/usr/local/lib/python3.11/site-packages/:$PYTHONPATH

I was just able to import pybertini on my machine after:

  1. compiling and installing the core
  2. compiling and installing the C++ part of the Python bindings
  3. installing the Python part of Pybertini
  4. adding locations to PYTHONPATH

whether anything inside the package actually works is another story, ha

jpcurbelo commented 1 year ago

Thanks. Will try!

ofloveandhate commented 1 year ago

I'm playing around with polynomial systems from the Runge Kutta equations for a given number of stages and order.

Does this mean that you're looking for tools for quickly evaluating polynomials to implement your own RK methods? There are some pretty generic RK methods in the c++ core, implemented by @jbcolli2

jpcurbelo commented 1 year ago

Hi @ofloveandhate. Excuse my delay, I was off for a couple of days. Yes, the idea is to solve the systems for RK methods whose existence has been proved and somehow obtain numerical proof for those that haven't been found. Then, we'll see if we can find new high-order RK methods. I'll take a look at the work by @jbcolli2. Thanks!