Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails due to obsolete numpy code #54

Open
janpisl opened this issue Nov 21, 2023 · 3 comments
Open

Installation fails due to obsolete numpy code #54

janpisl opened this issue Nov 21, 2023 · 3 comments

Comments

@janpisl
Copy link

janpisl commented Nov 21, 2023

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.
@mohammad-a-sh
Copy link

Hi
I have the same problem! If you found the solution please share it!

@janpisl
Copy link
Author

janpisl commented Nov 22, 2023

I managed to install it. I created a clean environment with Python 3.8, installed libraries from the provided requirements.txt with conda, those that were not available I installed with pip, there were some version mismatches and I had to install a 2020 version of pyopencl because I couldn't install the specified version (2018.2.5). But in the end it works and I am trying it out now.

Let me know if I can be of any more help.

@mohammad-a-sh
Copy link

Hi Jan.

I'm thankful for your guidance.
I installed Python 3.8 along with the requirements, but I got an error. I also got an error for Python 3.7, but I was able to run it in Python 3.6.
Thank you.

I wish the best for you
Mohammad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants