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

New version of NumPy not supporting SCRIP installation #47

Open
chnrr1 opened this issue May 5, 2023 · 3 comments
Open

New version of NumPy not supporting SCRIP installation #47

chnrr1 opened this issue May 5, 2023 · 3 comments

Comments

@chnrr1
Copy link

chnrr1 commented May 5, 2023

as described in https://numpy.org/doc/stable/reference/distutils_status_migration.html#distutils-status-migration

numpy.distutils has been deprecated in NumPy 1.23.0, which affects the installation of SCRIP and bathy_smoother

Use python3.10 and numpy1.22 instead of the latest version

@YoungEnzo
Copy link

YoungEnzo commented Jun 15, 2023

bro, I have successfully installed scrip. When I run the make_remap_weights_file.py, it reported an error..

Assuming spherical is integer b'T' <class 'numpy.ma.core.MaskedArray'>
Load geographical grid from file
grid shape 750 1100
grid shape 750 1099
grid shape 749 1100
Traceback (most recent call last):
  File "/home/enzo/pyroms/inputfiles/yangjiang/make_remap_weights_file.py", line 33, in <module>
    pyroms.remapping.compute_remap_weights(
  File "/home/enzo/pyroms/pyroms/pyroms/remapping/compute_remap_weights.py", line 41, in compute_remap_weights
    pyroms.remapping.scrip.compute_remap_weights('compute_remap_weights_in')
AttributeError: module 'pyroms.remapping' has no attribute 'scrip'

And I can also import the library successful...

(base) enzo@enzo:~/pyroms/inputfiles/yangjiang$ python
Python 3.10.11 (main, Apr 20 2023, 19:02:41) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> import mpl_toolkits
>>> import lpsolve55
>>> from mpl_toolkits.basemap import Basemap
>>> import pyroms
>>> import pyroms_toolbox
>>> import bathy_smoother
>>> import pyroms.scrip
>>> 

Do you konw how to solve it? Thank you!

@kshedstrom
Copy link
Collaborator

kshedstrom commented Jun 15, 2023

AttributeError: module 'pyroms.remapping' has no attribute 'scrip'

I haven't been able to load scrip in years so I told pyroms to stop trying to load it.

numpy.distutils has been deprecated in NumPy 1.23.0, which affects the installation of SCRIP and bathy_smoother

This affects not just scrip, but a number of other files which still do load. This is a serious problem for the future of pyroms and I don't have a good answer for what to do about it. In an ideal world, someone would start over from scratch to create better, newer, more modern Python tools for ROMS, but it won't be me.

@raickhr
Copy link

raickhr commented Sep 2, 2023

The following worked for me:

copy "scrip.cpython-38-x86_64-linux-gnu.so" file from the "/home/enzo/pyroms/pyroms/pyroms/" folder to the "/home/enzo/pyroms/pyroms/pyroms/remapping" folder

add "import pyroms.remapping.scrip" to the file "/home/enzo/pyroms/pyroms/pyroms/remapping/compute_remap_weights.py"

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

4 participants