all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#63912: python-scikit-learn can't be imported "module compiled against API version 0x10 but this version of numpy is 0xf"
@ 2023-06-05 16:50 Edouard Klein
       [not found] ` <handler.63912.B.168598396219790.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Edouard Klein @ 2023-06-05 16:50 UTC (permalink / raw)
  To: 63912

Dear Guix maintainers,

If I run:
guix shell python-scikit-learn
and in it, run:
python3 -c "from sklearn.feature_extraction.text import CountVectorizer"
I get:
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 .
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.10/site-packages/sklearn/__init__.py", line 82, in <module>
    from .base import clone
  File "/usr/lib/python3.10/site-packages/sklearn/base.py", line 17, in <module>
    from .utils import _IS_32BIT
  File "/usr/lib/python3.10/site-packages/sklearn/utils/__init__.py", line 17, in <module>
    from scipy.sparse import issparse
  File "/usr/lib/python3.10/site-packages/scipy/sparse/__init__.py", line 267, in <module>
    from ._csr import *
  File "/usr/lib/python3.10/site-packages/scipy/sparse/_csr.py", line 10, in <module>
    from ._sparsetools import (csr_tocsc, csr_tobsr, csr_count_blocks,
ImportError: numpy.core.multiarray failed to import

I can't look into it right now, but I'm available to provide any
necessary information.

Cheers,

Edouard.




^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#63912: Acknowledgement (python-scikit-learn can't be imported "module compiled against API version 0x10 but this version of numpy is 0xf")
       [not found] ` <handler.63912.B.168598396219790.ack@debbugs.gnu.org>
@ 2023-06-14  6:38   ` Edouard Klein
  0 siblings, 0 replies; 2+ messages in thread
From: Edouard Klein @ 2023-06-14  6:38 UTC (permalink / raw)
  To: 63912-done

I found the cause:

.local/lib/python3.10/site-packages/  is part of the interpreter's load
path, and so an old version of numpy was imported in priority over
guix's.

I don't know if this is by design, but if so, it means that any
pip --user installed package will overshadow any guix install package,
even when giving --pure to guix shell. It may not be what we want.

What made me find this is that sklearn worked when in a container, but
not in a shell, that meant that something from the local system was
leaking into the shell.



help-debbugs@gnu.org (GNU bug Tracking System) writes:

> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
>  bug-guix@gnu.org
>
> If you wish to submit further information on this problem, please
> send it to 63912@debbugs.gnu.org.
>
> Please do not send mail to help-debbugs@gnu.org unless you wish
> to report a problem with the Bug-tracking system.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-14  7:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-05 16:50 bug#63912: python-scikit-learn can't be imported "module compiled against API version 0x10 but this version of numpy is 0xf" Edouard Klein
     [not found] ` <handler.63912.B.168598396219790.ack@debbugs.gnu.org>
2023-06-14  6:38   ` bug#63912: Acknowledgement (python-scikit-learn can't be imported "module compiled against API version 0x10 but this version of numpy is 0xf") Edouard Klein

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.