This isn't really a bug report but rather a comment to help others that may run into this issue.
In my code that uses geopack, I've added
import platform
import magnetovis as mvs
platform_str = platform.platform()
if platform_str.endswith('arm64-arm-64bit'):
try:
from geopack import geopack
except:
msg = 'pip install --pre -i https://pypi.anaconda.org/scipy-wheels-nightly/simple scipy'
msg = '\n\nThis function uses a library that depends on scipy. On Mac M1, you need to install scipy using: \n\n ' + msg + '\n'
raise ImportError(msg)
One thing to consider is the only place scipy is used is in t96.py. There, only scipy.special is used for Bessel functions. The scipy dependency adds 40 MB to the required packages and so one may want to consider using https://libraries.io/pypi/special-functions, which is only 2 MB and has no external dependencies.
My install of geopack failed on a M1 mac because the scipy install failed.
I was able to get it to work using
This isn't really a bug report but rather a comment to help others that may run into this issue.
In my code that uses geopack, I've added
One thing to consider is the only place
scipy
is used is int96.py
. There, onlyscipy.special
is used for Bessel functions. Thescipy
dependency adds 40 MB to the required packages and so one may want to consider using https://libraries.io/pypi/special-functions, which is only 2 MB and has no external dependencies.