Closed latm-lab closed 7 months ago
Hi,
To me that looks like an issue with the way you've installed scipy, rather than the EAR: you should be able to see the same error if you run import scipy.spatial
in a python console.
I'd probably try installing scipy with the commands at the top of this issue: https://github.com/scipy/scipy/issues/13409#issue-790703815
It looks like you've installed a development version of scipy, too; that might not be helping.
It shouldn't affect this issue, but it would probably be a good idea to use a version of the EAR from git rather than the one on pypi, as that's a bit old now: https://ear.readthedocs.io/en/docs/install.html#install-ear
I can't easily try it out as i don't have easy access to a M1 mac, but I would try following the install instructions here: https://ear.readthedocs.io/en/docs/install.html
To summarise, I would
Hope that helps; if you can't get it working I'll see if someone here with an M1 mac can try it out. Good luck!
Thank you very much for commenting and proposing solutions. I'll verify them out, but in the meanwhile let me comment:
homebrew and virtualenv were considered but avoided since another python installation would be required, adding multiple installations to the machine (taking unnecessary space and more complexity)
scipy was installed cloning from github, following instructions at https://docs.scipy.org/doc/scipy/reference/building/macosx.html:
$ git clone https://github.com/scipy/scipy.git $ python setup.py build $ python setup.py install
It might be a solution to update the scipy installation using pip, and then clone and install EAR from git as you pointed out, what do you think?
No problem. A couple of notes on what you said:
It looks like the next version of scipy will be released very soon with M1 support, so it might be easiest to wait for that.
Should be well fixed by now!
We are facing problems to install EAR on a MAC OS (Big Sur) in a macbook pro M1 chip (arm64 architecture) as it requires Numpy and Scipy. Numpy could be installed faster, but Scipy required much more effort: the solution required to build and install every dependency first (openblas, pybind11, cython, pythran and propack). After that, installation using "pip install ear" finally fulfilled. However the software still can not be launched. Please find below the errors in command line (after trying "ear-render" command). Any help is welcome.
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/bin/ear-render", line 33, in
sys.exit(load_entry_point('ear==2.0.0', 'console_scripts', 'ear-render')())
File "/Library/Frameworks/Python.framework/Versions/3.9/bin/ear-render", line 25, in importlib_load_entry_point
return next(matches).load()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ear/cmdline/render_file.py", line 7, in
from ..core import bs2051, layout, Renderer
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ear/core/init.py", line 1, in
from .renderer import Renderer # noqa: F401
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ear/core/renderer.py", line 2, in
from .objectbased.renderer import ObjectRenderer
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ear/core/objectbased/renderer.py", line 7, in
from .gain_calc import GainCalc
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ear/core/objectbased/gain_calc.py", line 5, in
from .. import point_source
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ear/core/point_source.py", line 2, in
import scipy.spatial
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/scipy-1.8.0.dev0+2035.550b28e-py3.9-macosx-10.9-universal2.egg/scipy/spatial/init.py", line 108, in
from ._geometric_slerp import geometric_slerp
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/scipy-1.8.0.dev0+2035.550b28e-py3.9-macosx-10.9-universal2.egg/scipy/spatial/_geometric_slerp.py", line 9, in
from scipy.spatial.distance import euclidean
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/scipy-1.8.0.dev0+2035.550b28e-py3.9-macosx-10.9-universal2.egg/scipy/spatial/distance.py", line 126, in
from ..special import rel_entr
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/scipy-1.8.0.dev0+2035.550b28e-py3.9-macosx-10.9-universal2.egg/scipy/special/init.py", line 643, in
from . import _ufuncs
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/scipy-1.8.0.dev0+2035.550b28e-py3.9-macosx-10.9-universal2.egg/scipy/special/_ufuncs.cpython-39-darwin.so, 2): Symbol not found: _cephes_cosdg
Referenced from: /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/scipy-1.8.0.dev0+2035.550b28e-py3.9-macosx-10.9-universal2.egg/scipy/special/_ufuncs.cpython-39-darwin.so
Expected in: flat namespace
in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/scipy-1.8.0.dev0+2035.550b28e-py3.9-macosx-10.9-universal2.egg/scipy/special/_ufuncs.cpython-39-darwin.so