Bug 43816 - scipy.integrate fails miserably
Summary: scipy.integrate fails miserably
Status: NEW
Alias: None
Product: Sisyphus
Classification: Development
Component: python3-module-scipy (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 major
Assignee: Stanislav Levin
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-18 20:30 MSK by ildar
Modified: 2023-01-13 14:30 MSK (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ildar 2022-09-18 20:30:03 MSK
>>> import scipy.integrate
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3/site-packages/scipy/integrate/__init__.py", line 94, in <module>
    from ._bvp import solve_bvp
  File "/usr/lib64/python3/site-packages/scipy/integrate/_bvp.py", line 9, in <module>
    from scipy.optimize import OptimizeResult
  File "/usr/lib64/python3/site-packages/scipy/optimize/__init__.py", line 401, in <module>
    from ._minimize import *
  File "/usr/lib64/python3/site-packages/scipy/optimize/_minimize.py", line 27, in <module>
    from ._trustregion_constr import _minimize_trustregion_constr
  File "/usr/lib64/python3/site-packages/scipy/optimize/_trustregion_constr/__init__.py", line 4, in <module>
    from .minimize_trustregion_constr import _minimize_trustregion_constr
  File "/usr/lib64/python3/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py", line 5, in <module>
    from .._constraints import (
  File "/usr/lib64/python3/site-packages/scipy/optimize/_constraints.py", line 8, in <module>
    from numpy.testing import suppress_warnings
ModuleNotFoundError: No module named 'numpy.testing'
Comment 1 Pavel Shilov 2023-01-13 10:02:03 MSK
Прошу предоставить дополнительную информацию
# uname -a
# cat /etc/os-release
# apt-repo
# rpm -qa | grep python3-module-scipy

Так же просьба предоставить шаги воспроизведения данной ошибки.
Спасибо
Comment 2 ildar 2023-01-13 10:18:52 MSK
У меня p10.
$ python3
>>> import scipy.integrate
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
...
  File "/usr/lib64/python3/site-packages/scipy/optimize/_constraints.py", line 8, in <module>
    from numpy.testing import suppress_warnings
ModuleNotFoundError: No module named 'numpy.testing'
Comment 3 Pavel Shilov 2023-01-13 11:00:06 MSK
Произвел проверку на платформе:
* workstation-10-x86-64

Версии пакетов: 
$ rpm -qi python3
Name        : python3
Version     : 3.10.8
Release     : alt1.1
DistTag     : sisyphus+311926.100.2.1

$ rpm -qi python3-module-scipy
Name        : python3-module-scipy
Version     : 1.6.1
Release     : alt3
DistTag     : sisyphus+291245.62040.59.1

$ rpm -qi python3-module-numpy
Name        : python3-module-numpy
Epoch       : 1
Version     : 1.22.1
Release     : alt3
DistTag     : sisyphus+294708.100.1.1


По указанным шагам ошибка воспроизвелась
$ python3
Python 3.10.8 (main, Dec 17 2022, 11:34:59) [GCC 12.1.1 20220518 (ALT Sisyphus 12.1.1-alt2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy import linalg, optimize
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3/site-packages/scipy/optimize/__init__.py", line 401, in <module>
    from ._minimize import *
  File "/usr/lib64/python3/site-packages/scipy/optimize/_minimize.py", line 27, in <module>
    from ._trustregion_constr import _minimize_trustregion_constr
  File "/usr/lib64/python3/site-packages/scipy/optimize/_trustregion_constr/__init__.py", line 4, in <module>
    from .minimize_trustregion_constr import _minimize_trustregion_constr
  File "/usr/lib64/python3/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py", line 5, in <module>
    from .._constraints import (
  File "/usr/lib64/python3/site-packages/scipy/optimize/_constraints.py", line 8, in <module>
    from numpy.testing import suppress_warnings
ModuleNotFoundError: No module named 'numpy.testing'
Comment 4 Grigory Ustinov 2023-01-13 14:30:55 MSK
Там действительно есть два файла
scipy/optimize/_constraints.py
scipy/stats/_binned_statistic.py
в которых идёт вызов numpy.testing
и которые не попадают по смыслу под
 50 %if_with tests                                                                   
 51 %add_python3_req_skip scipy.fft.tests                                            
 52 %else                                                                            
 53 %add_python3_req_skip numpy.testing

Но прошу, давайте после обновления python3? Там и так бардак с циклическими зависимостями вокруг этих пакетов.

2ildar@: Добавьте пока просто python3-module-numpy-testing куда вам там надо.