ImportError: libgfortran.so.4 with conda Sherpa 4.10
See original GitHub issueIn Gammapy we have a build that now fetches Sherpa 4.10 and fails like this: https://travis-ci.org/gammapy/gammapy/jobs/377744827#L3797
$ python -c 'import sherpa.optmethods'
...
/home/travis/miniconda/envs/test/lib/python2.7/site-packages/sherpa-4.10.0-py2.7-linux-x86_64.egg/sherpa/optmethods/optfcts.py:29: ImportError
ImportError: libgfortran.so.4: cannot open shared object file: No such file or directory
...
I think basically we do the equivalent of this in our .travis.yml, but I’m not sure:
conda channel --add conda-forge sherpa
conda install sherpa libgfortran
This build used to work with Sherpa 4.9, so presumably something changed in 4.10?
Or is our .travis.yml no good and we fetch e.g. a wrong libgfortran for some reason?
@olaurino - Help?
PS: locally on Mac with Sherpa 4.10 from conda all Gammapy tests pass.
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
libgfortran ng fortran – Pkorcords
We're excited to introduce Databricks Runtime 5.5 with Conda (Beta), which lets you take ... ImportError: libgfortran.so.4 with conda Sherpa 4.10 · …...
Read more >Fit models to your data in Python with Sherpa. - PythonRepo
Sherpa is a modeling and fitting application for Python. It contains a powerful language for combining simple models into complex expressions that can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This install issue was resolved via the latest Sherpa release: https://github.com/sherpa/sherpa/releases/tag/4.10.1
They removed the Fortran dependency in https://github.com/sherpa/sherpa/pull/481 (we don’t use xspec in Gammapy).
This build from a few days ago is with Sherpa 4.10.0 and has the libgfortran link error: https://travis-ci.org/gammapy/gammapy/jobs/440784483#L2483
This build is from today with Sherpa 4.10.1 and passed without error: https://travis-ci.org/gammapy/gammapy/jobs/442767281#L2477
@olaurino - Thanks! 🚀🥇 🍕 🍻
@cdeil - I’m sorry, this ping has lost in the weeds of my move. Next time try to ping me elsewhere, too if there is no initial response.