FS#69494 - [python-pytorch] mismatch numpy

Attached to Project: Community Packages
Opened by DarcyHu (DarcyHu) - Monday, 01 February 2021, 08:08 GMT
Last edited by Konstantin Gizdov (kgizdov) - Monday, 01 February 2021, 16:35 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jan de Groot (JGC)
Sven-Hendrik Haase (Svenstaro)
Felix Yan (felixonmars)
Konstantin Gizdov (kgizdov)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:
could not import torch due to numpy version issue

Additional info:
* python-numpy 1.19.5-1
* python-pytorch-opt-cuda 1.7.1-4
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.9/site-packages/torch/__init__.py", line 190, in <module>
from torch._C import *
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd


Steps to reproduce:
run this command: python -c "import torch"

Maybe you build pytorch with the python-numpy from testing repo by accident?
This task depends upon

Closed by  Konstantin Gizdov (kgizdov)
Monday, 01 February 2021, 16:35 GMT
Reason for closing:  Fixed
Additional comments about closing:  correct python-numpy is now in [extra]
Comment by DarcyHu (DarcyHu) - Monday, 01 February 2021, 08:12 GMT
I could confirm that if I install python-numpy-1.20.0-1 from testing repo, and pytorch works as expected. Could you publish a pytorch pkg build with python-numpy-1.19.5-1 in case python-numpy-1.20.0-1 is not available in extra repo?
Comment by DarcyHu (DarcyHu) - Monday, 01 February 2021, 09:35 GMT
I also confirm that tensorflow 2.4.1-3 is affected.

2021-02-01 17:34:06.096069: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
ImportError: numpy.core._multiarray_umath failed to import
ImportError: numpy.core.umath failed to import
2021-02-01 17:34:06.394154: F tensorflow/python/lib/core/bfloat16.cc:714] Check failed: PyBfloat16_Type.tp_base != nullptr
Comment by Chih-Hsuan Yen (yan12125) - Monday, 01 February 2021, 10:04 GMT
I also assigned maintainers of numpy (felixonmars, jgc) for deciding whether numpy should be moved to extra or depending libraries should be rebuilt against older numpy.

Loading...