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 Error on macOS M2/M3 Due to NumPy Compatibility #31

Open
1 of 2 tasks
mahmud1 opened this issue Jan 13, 2025 · 1 comment
Open
1 of 2 tasks

Installation Error on macOS M2/M3 Due to NumPy Compatibility #31

mahmud1 opened this issue Jan 13, 2025 · 1 comment
Labels
question Further information is requested

Comments

@mahmud1
Copy link
Member

mahmud1 commented Jan 13, 2025

After successful installation on macOS M2/M3, running sarvey fails. It seems to be due to compatibility issues with NumPy version 2.0 or later. Downgrading NumPy to a version below 2 resolves the problem.

  • Check to see if the issue occurs in Linux installation.
  • Update the installation if required.
$  sarvey -h

Using default MintPy Path: /Users/foo/software/sarvey/MiaplPy/src
/Users/foo/software/sarvey/MiaplPy/src/miaplpy/objects/utils.py:521: SyntaxWarning: invalid escape sequence '\*'
  value = value.replace('*', '\*')  # interpret * as character
/Users/foo/software/sarvey/MiaplPy/src/miaplpy/objects/utils.py:522: SyntaxWarning: invalid escape sequence '\s'
  old_value_str = re.findall('=' + '[\s]*' + value, line)[0]
/Users/foo/software/sarvey/MiaplPy/src/miaplpy/objects/utils.py:1038: SyntaxWarning: "is not" with 'int' literal. Did you mean "!="?
  if status is not 0:
/Users/foo/software/sarvey/MiaplPy/src/miaplpy/defaults/auto_path.py:166: SyntaxWarning: invalid escape sequence '\d'
  m_date12 = re.findall('\d{6}-\d{6}', lookup_file)[0]
/Users/foo/software/sarvey/MiaplPy/src/miaplpy/defaults/auto_path.py:223: SyntaxWarning: invalid escape sequence '\d'
  lks = re.findall('_\d+rlks', glob.glob(lookup_file)[0])[0]
Traceback (most recent call last):
  File "/Users/foo/software/mambaforge/envs/sarvey/bin/sarvey", line 33, in <module>
    sys.exit(load_entry_point('sarvey', 'console_scripts', 'sarvey')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/foo/software/mambaforge/envs/sarvey/bin/sarvey", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/Users/foo/software/mambaforge/envs/sarvey/lib/python3.12/importlib/metadata/__init__.py", line 205, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/foo/software/mambaforge/envs/sarvey/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 999, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/Users/foo/software/sarvey/MiaplPy/sarvey/sarvey/sarvey_mti.py", line 46, in <module>
    from sarvey.processing import Processing
  File "/Users/foo/software/sarvey/MiaplPy/sarvey/sarvey/processing.py", line 42, in <module>
    from sarvey.densification import densifyNetwork
  File "/Users/foo/software/sarvey/MiaplPy/sarvey/sarvey/densification.py", line 39, in <module>
    from sarvey.unwrapping import oneDimSearchTemporalCoherence
  File "/Users/foo/software/sarvey/MiaplPy/sarvey/sarvey/unwrapping.py", line 38, in <module>
    from kamui import unwrap_arbitrary
  File "/Users/foo/software/mambaforge/envs/sarvey/lib/python3.12/site-packages/kamui/__init__.py", line 5, in <module>
    from .utils import *
  File "/Users/foo/software/mambaforge/envs/sarvey/lib/python3.12/site-packages/kamui/utils.py", line 207, in <module>
    ) -> npt.NDArray[np.float_]:
                     ^^^^^^^^^
  File "/Users/foo/software/mambaforge/envs/sarvey/lib/python3.12/site-packages/numpy/__init__.py", line 397, in __getattr__
    raise AttributeError(
AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.. Did you mean: 'float16'?
@mahmud1 mahmud1 added the question Further information is requested label Jan 13, 2025
@mahmud1
Copy link
Member Author

mahmud1 commented Feb 19, 2025

The reason is that Kamui is not yet compatible with Numpy >= 2.0. Installing Numpy 1.* works fine.

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

No branches or pull requests

1 participant