ajdawson / windspharm

A Python library for spherical harmonic computations on vector winds.
http://ajdawson.github.io/windspharm
MIT License
82 stars 36 forks source link

Error with dlopen #87

Closed jdossgollin closed 6 years ago

jdossgollin commented 6 years ago

I had windspharm working fine a week or so ago, but it is no longer working and I haven't managed to figure out why. Quite simply, if I try to use the package, it throws a dlopen error. Thanks for any suggestions

>>> import windspharm
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/miniconda3/envs/pyfloods/lib/python3.6/site-packages/windspharm/__init__.py", line 23, in <module>
    from . import standard
  File "/usr/local/miniconda3/envs/pyfloods/lib/python3.6/site-packages/windspharm/standard.py", line 22, in <module>
    from spharm import Spharmt, gaussian_lats_wts
  File "/usr/local/miniconda3/envs/pyfloods/lib/python3.6/site-packages/spharm/__init__.py", line 1, in <module>
    from .spharm import __doc__
  File "/usr/local/miniconda3/envs/pyfloods/lib/python3.6/site-packages/spharm/spharm.py", line 123, in <module>
    import _spherepack, numpy, math, sys
ImportError: dlopen(/usr/local/miniconda3/envs/pyfloods/lib/python3.6/site-packages/_spherepack.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libgfortran.3.dylib
  Referenced from: /usr/local/miniconda3/envs/pyfloods/lib/python3.6/site-packages/_spherepack.cpython-36m-darwin.so
  Reason: image not found
>>> 

More info: using python 3.6 and install with conda install -c conda-forge windspharm.

ajdawson commented 6 years ago

I think the conda-forge libgfortran has some problem. This is out-of-scope for windspharm issues, but feel free to keep this open and reference it in any report to conda-forge.

jdossgollin commented 6 years ago

OK thanks. I was able to get it working (some hair may have been pulled) by messing around with my conda environment -- instead of putting everything in environment.yml, I put only the non-conda-forge packages in environment.yml and then ran conda install -c conda-forge windspharm (...) separately. Seemed to work better. Will mark closed and hope that it may be helpful to someone googling at some point in the future.