Admin message

Due to an influx of spam, we have had to require each new account to be manually approved. Please register an account and then write an email to accountsupport@archlinux.org to get it approved. Sorry for the inconvenience.

tensorflow module compiled with numpy 1.x
<!-- Please read our Bug reporting guidelines before opening a bug: https://wiki.archlinux.org/title/Bug_reporting_guidelines If you want to help catching more bugs upfront, consider joining the Arch Testing Team: https://wiki.archlinux.org/title/Arch_Testing_Team --> # Description: When importing tensorflow an error is emitted: ``` A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. ``` <details><summary>Click to see full error</summary> ``` >>> import tensorflow2024-07-11 10:11:58.913626: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. Traceback (most recent call last): File "/usr/lib/python3.12/site-packages/bpython/curtsiesfrontend/coderunner.py", line 185, in _blocking_run_code unfinished = self.interp.runsource(self.source) File "/usr/lib/python3.12/site-packages/bpython/repl.py", line 153, in runsource return super().runsource(source, filename, symbol) File "/usr/lib/python3.12/code.py", line 74, in runsource self.runcode(code) File "/usr/lib/python3.12/code.py", line 90, in runcode exec(code, self.locals) File "<bpython-input-3>", line 1, in <module> import tensorflow File "/usr/lib/python3.12/site-packages/tensorflow/__init__.py", line 46, in <module> from tensorflow._api.v2 import __internal__ File "/usr/lib/python3.12/site-packages/tensorflow/_api/v2/__internal__/__init__.py", line 8, in <module> from tensorflow._api.v2.__internal__ import autograph File "/usr/lib/python3.12/site-packages/tensorflow/_api/v2/__internal__/autograph/__init__.py", line 8, in <module> from tensorflow.python.autograph.core.ag_ctx import control_status_ctx # line: 34 File "/usr/lib/python3.12/site-packages/tensorflow/python/autograph/core/ag_ctx.py", line 21, in <module> from tensorflow.python.autograph.utils import ag_logging File "/usr/lib/python3.12/site-packages/tensorflow/python/autograph/utils/__init__.py", line 17, in <module> from tensorflow.python.autograph.utils.context_managers import control_dependency_on_returns File "/usr/lib/python3.12/site-packages/tensorflow/python/autograph/utils/context_managers.py", line 19, in <module> from tensorflow.python.framework import ops File "/usr/lib/python3.12/site-packages/tensorflow/python/framework/ops.py", line 46, in <module> from tensorflow.python import pywrap_tfe File "/usr/lib/python3.12/site-packages/tensorflow/python/pywrap_tfe.py", line 25, in <module> from tensorflow.python._pywrap_tfe import * Traceback (most recent call last): File "/usr/lib/python3.12/site-packages/numpy/core/_multiarray_umath.py", line 44, in __getattr__ raise ImportError(msg) ImportError: A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. Traceback (most recent call last): File "/usr/lib/python3.12/site-packages/bpython/curtsiesfrontend/coderunner.py", line 185, in _blocking_run_code unfinished = self.interp.runsource(self.source) File "/usr/lib/python3.12/site-packages/bpython/repl.py", line 153, in runsource return super().runsource(source, filename, symbol) File "/usr/lib/python3.12/code.py", line 74, in runsource self.runcode(code) File "/usr/lib/python3.12/code.py", line 90, in runcode exec(code, self.locals) File "<bpython-input-3>", line 1, in <module> import tensorflow File "/usr/lib/python3.12/site-packages/tensorflow/__init__.py", line 46, in <module> from tensorflow._api.v2 import __internal__ File "/usr/lib/python3.12/site-packages/tensorflow/_api/v2/__internal__/__init__.py", line 8, in <module> from tensorflow._api.v2.__internal__ import autograph File "/usr/lib/python3.12/site-packages/tensorflow/_api/v2/__internal__/autograph/__init__.py", line 8, in <module> from tensorflow.python.autograph.core.ag_ctx import control_status_ctx # line: 34 File "/usr/lib/python3.12/site-packages/tensorflow/python/autograph/core/ag_ctx.py", line 21, in <module> from tensorflow.python.autograph.utils import ag_logging File "/usr/lib/python3.12/site-packages/tensorflow/python/autograph/utils/__init__.py", line 17, in <module> from tensorflow.python.autograph.utils.context_managers import control_dependency_on_returns File "/usr/lib/python3.12/site-packages/tensorflow/python/autograph/utils/context_managers.py", line 19, in <module> from tensorflow.python.framework import ops File "/usr/lib/python3.12/site-packages/tensorflow/python/framework/ops.py", line 49, in <module> from tensorflow.python.client import pywrap_tf_session File "/usr/lib/python3.12/site-packages/tensorflow/python/client/pywrap_tf_session.py", line 19, in <module> from tensorflow.python.client._pywrap_tf_session import * Traceback (most recent call last): File "/usr/lib/python3.12/site-packages/numpy/core/_multiarray_umath.py", line 44, in __getattr__ raise ImportError(msg) ImportError: A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. Traceback (most recent call last): File "/usr/lib/python3.12/site-packages/bpython/curtsiesfrontend/coderunner.py", line 185, in _blocking_run_code unfinished = self.interp.runsource(self.source) File "/usr/lib/python3.12/site-packages/bpython/repl.py", line 153, in runsource return super().runsource(source, filename, symbol) File "/usr/lib/python3.12/code.py", line 74, in runsource self.runcode(code) File "/usr/lib/python3.12/code.py", line 90, in runcode exec(code, self.locals) File "<bpython-input-3>", line 1, in <module> import tensorflow File "/usr/lib/python3.12/site-packages/tensorflow/__init__.py", line 46, in <module> from tensorflow._api.v2 import __internal__ File "/usr/lib/python3.12/site-packages/tensorflow/_api/v2/__internal__/__init__.py", line 11, in <module> from tensorflow._api.v2.__internal__ import distribute File "/usr/lib/python3.12/site-packages/tensorflow/_api/v2/__internal__/distribute/__init__.py", line 8, in <module> from tensorflow._api.v2.__internal__.distribute import combinations File "/usr/lib/python3.12/site-packages/tensorflow/_api/v2/__internal__/distribute/combinations/__init__.py", line 8, in <module> from tensorflow.python.distribute.combinations import env # line: 456 File "/usr/lib/python3.12/site-packages/tensorflow/python/distribute/combinations.py", line 33, in <module> from tensorflow.python.distribute import collective_all_reduce_strategy File "/usr/lib/python3.12/site-packages/tensorflow/python/distribute/collective_all_reduce_strategy.py", line 25, in <module> from tensorflow.python.distribute import cross_device_ops as cross_device_ops_lib File "/usr/lib/python3.12/site-packages/tensorflow/python/distribute/cross_device_ops.py", line 28, in <module> from tensorflow.python.distribute import cross_device_utils File "/usr/lib/python3.12/site-packages/tensorflow/python/distribute/cross_device_utils.py", line 22, in <module> from tensorflow.python.distribute import values as value_lib File "/usr/lib/python3.12/site-packages/tensorflow/python/distribute/values.py", line 23, in <module> from tensorflow.python.distribute import distribute_lib File "/usr/lib/python3.12/site-packages/tensorflow/python/distribute/distribute_lib.py", line 205, in <module> from tensorflow.python.data.ops import dataset_ops File "/usr/lib/python3.12/site-packages/tensorflow/python/data/__init__.py", line 21, in <module> from tensorflow.python.data import experimental File "/usr/lib/python3.12/site-packages/tensorflow/python/data/experimental/__init__.py", line 98, in <module> from tensorflow.python.data.experimental import service File "/usr/lib/python3.12/site-packages/tensorflow/python/data/experimental/service/__init__.py", line 419, in <module> from tensorflow.python.data.experimental.ops.data_service_ops import distribute File "/usr/lib/python3.12/site-packages/tensorflow/python/data/experimental/ops/data_service_ops.py", line 26, in <module> from tensorflow.python.data.ops import dataset_ops File "/usr/lib/python3.12/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 34, in <module> from tensorflow.python.data.ops import iterator_ops File "/usr/lib/python3.12/site-packages/tensorflow/python/data/ops/iterator_ops.py", line 45, in <module> from tensorflow.python.training.saver import BaseSaverBuilder File "/usr/lib/python3.12/site-packages/tensorflow/python/training/saver.py", line 50, in <module> from tensorflow.python.training import py_checkpoint_reader File "/usr/lib/python3.12/site-packages/tensorflow/python/training/py_checkpoint_reader.py", line 19, in <module> from tensorflow.python.util._pywrap_checkpoint_reader import CheckpointReader Traceback (most recent call last): File "/usr/lib/python3.12/site-packages/numpy/core/_multiarray_umath.py", line 44, in __getattr__ raise ImportError(msg) ImportError: A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. Traceback (most recent call last): File "<input>", line 1, in <module> import tensorflow File "/usr/lib/python3.12/site-packages/tensorflow/__init__.py", line 46, in <module> from tensorflow._api.v2 import __internal__ File "/usr/lib/python3.12/site-packages/tensorflow/_api/v2/__internal__/__init__.py", line 11, in <module> from tensorflow._api.v2.__internal__ import distribute File "/usr/lib/python3.12/site-packages/tensorflow/_api/v2/__internal__/distribute/__init__.py", line 8, in <module> from tensorflow._api.v2.__internal__.distribute import combinations File "/usr/lib/python3.12/site-packages/tensorflow/_api/v2/__internal__/distribute/combinations/__init__.py", line 8, in <module> from tensorflow.python.distribute.combinations import env # line: 456 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/tensorflow/python/distribute/combinations.py", line 33, in <module> from tensorflow.python.distribute import collective_all_reduce_strategy File "/usr/lib/python3.12/site-packages/tensorflow/python/distribute/collective_all_reduce_strategy.py", line 25, in <module> from tensorflow.python.distribute import cross_device_ops as cross_device_ops_lib File "/usr/lib/python3.12/site-packages/tensorflow/python/distribute/cross_device_ops.py", line 28, in <module> from tensorflow.python.distribute import cross_device_utils File "/usr/lib/python3.12/site-packages/tensorflow/python/distribute/cross_device_utils.py", line 22, in <module> from tensorflow.python.distribute import values as value_lib File "/usr/lib/python3.12/site-packages/tensorflow/python/distribute/values.py", line 23, in <module> from tensorflow.python.distribute import distribute_lib File "/usr/lib/python3.12/site-packages/tensorflow/python/distribute/distribute_lib.py", line 205, in <module> from tensorflow.python.data.ops import dataset_ops File "/usr/lib/python3.12/site-packages/tensorflow/python/data/__init__.py", line 21, in <module> from tensorflow.python.data import experimental File "/usr/lib/python3.12/site-packages/tensorflow/python/data/experimental/__init__.py", line 98, in <module> from tensorflow.python.data.experimental import service File "/usr/lib/python3.12/site-packages/tensorflow/python/data/experimental/service/__init__.py", line 419, in <module> from tensorflow.python.data.experimental.ops.data_service_ops import distribute File "/usr/lib/python3.12/site-packages/tensorflow/python/data/experimental/ops/data_service_ops.py", line 26, in <module> from tensorflow.python.data.ops import dataset_ops File "/usr/lib/python3.12/site-packages/tensorflow/python/data/ops/dataset_ops.py", line 34, in <module> from tensorflow.python.data.ops import iterator_ops File "/usr/lib/python3.12/site-packages/tensorflow/python/data/ops/iterator_ops.py", line 45, in <module> from tensorflow.python.training.saver import BaseSaverBuilder File "/usr/lib/python3.12/site-packages/tensorflow/python/training/saver.py", line 50, in <module> from tensorflow.python.training import py_checkpoint_reader File "/usr/lib/python3.12/site-packages/tensorflow/python/training/py_checkpoint_reader.py", line 19, in <module> from tensorflow.python.util._pywrap_checkpoint_reader import CheckpointReader SystemError: initialization of _pywrap_checkpoint_reader raised unreported exception ``` </details> # Additional info: * package version(s): `2.17.0rc1-2` * link to upstream bug report, if any: - # Steps to reproduce: <!-- Describe how to reproduce the bug step by step including the commands --> 1. Download and install tensorflow 2. `import tensorflow`
issue