> On Feb 10, 2023, at 8:02 PM, James Cook <falsif...@falsifian.org> wrote:
>
> Daniel Dickman <didick...@gmail.com> writes:
>> It's just a warning, right? It works for me here.
>>
>> If something isn't working on your end can you share a code snippet?
>
> Ah, you're right, it's just a warning.
>
> It does seem to work; I tested using beancount-import. Below is one
> unfortunate caveat. I'm not sure if this counts as ports' problem; maybe
> you could say it's my fault for mixing pkg_add and pip:
>
> If I do the following:
>
> - (as root) pkg_add some python deps including py3-scikit-learn (which
> depends on scipy)
> - (as non-root) pip install beancount-import
> - (as non-root, in Python) beancount_import.webserver.main(...)
>
> I see:
>
> RuntimeError: module compiled against API version 0x10 but this version of
> numpy is 0xf . Check the section C-API incompatibility at the Troubleshooting
> ImportError section at
> https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility
> for indications on how to solve this problem .
>
> and a bunch more error lines cumulating in
> ImportError: numpy.core.multiarray failed to import
> and the beancount-import webserver drops to a Pdb prompt.
>
> My guess: pip installed numpy-1.22.4 to my home dir because of the
> version incompatibility, but did not override the system scipy, leading
> to some sort of incompatibility. Evidence for my guess: if I delete
> ~/.local/python3.10/site-packages/numpy*, the error goes away and
> beancount-import works.
Thanks for sharing. Well I guess one thing you could do is look into upgrading
scipy to a newer version. But as I previously noted, prepare to roll up your
sleeves.
>
> --
> James