Skip to content

Installation fails due to obsolete numpy code #54

@janpisl

Description

@janpisl

I am unable to install bfast (with pip or from GitHub) due to the following issue:

jan@eceo-ws12:~/Documents/bfast$ pip install bfast
Collecting bfast
  Using cached bfast-0.7.tar.gz (306 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [26 lines of output]
      /tmp/pip-install-z8jn1skv/bfast_c2d55a80d9da45cd8daa95f8a2731d18/bfast/monitor/opencl/bfastfinal.py:50290: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
        'numpy_type': np.bool }
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-z8jn1skv/bfast_c2d55a80d9da45cd8daa95f8a2731d18/setup.py", line 16, in <module>
          import bfast
        File "/tmp/pip-install-z8jn1skv/bfast_c2d55a80d9da45cd8daa95f8a2731d18/bfast/__init__.py", line 1, in <module>
          from .models import BFASTMonitor
        File "/tmp/pip-install-z8jn1skv/bfast_c2d55a80d9da45cd8daa95f8a2731d18/bfast/models.py", line 1, in <module>
          from bfast.monitor import BFASTMonitorPython
        File "/tmp/pip-install-z8jn1skv/bfast_c2d55a80d9da45cd8daa95f8a2731d18/bfast/monitor/__init__.py", line 1, in <module>
          from .opencl import BFASTMonitorOpenCL
        File "/tmp/pip-install-z8jn1skv/bfast_c2d55a80d9da45cd8daa95f8a2731d18/bfast/monitor/opencl/__init__.py", line 1, in <module>
          from .base import BFASTMonitorOpenCL
        File "/tmp/pip-install-z8jn1skv/bfast_c2d55a80d9da45cd8daa95f8a2731d18/bfast/monitor/opencl/base.py", line 20, in <module>
          from .bfastfinal import bfastfinal
        File "/tmp/pip-install-z8jn1skv/bfast_c2d55a80d9da45cd8daa95f8a2731d18/bfast/monitor/opencl/bfastfinal.py", line 50290, in <module>
          'numpy_type': np.bool }
                        ^^^^^^^
        File "/home/jan/miniconda3/envs/bfast/lib/python3.11/site-packages/numpy/__init__.py", line 324, in __getattr__
          raise AttributeError(__former_attrs__[attr])
      AttributeError: module 'numpy' has no attribute 'bool'.
      `np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
      The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
          https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'bool_'?
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions