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

pip install fails: "xsFortran.h: no such file or directory" #136

Closed
JohannesBuchner opened this issue Dec 3, 2020 · 5 comments · Fixed by #137
Closed

pip install fails: "xsFortran.h: no such file or directory" #136

JohannesBuchner opened this issue Dec 3, 2020 · 5 comments · Fixed by #137

Comments

@JohannesBuchner
Copy link

I tried to install threeML, but astromodels failed. I think it tried to use the xspec installation from my home directory -- is it looking for the source files?

This is on Ubuntu Linux 20.04, Python 3.8.5, no python environments.

$ pip install threeML
Collecting threeML
  Downloading threeML-2.0.2.tar.gz (37.3 MB)
     |████████████████████████████████| 37.3 MB 257 kB/s 
Collecting astromodels
  Downloading astromodels-2.0.1.tar.gz (855 kB)
     |████████████████████████████████| 855 kB 18.6 MB/s 
Requirement already satisfied: astropy>=1.3.3 in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from threeML) (4.1)
Collecting astroquery
  Using cached astroquery-0.4.1.tar.gz (6.5 MB)
Requirement already satisfied: corner in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from threeML) (2.1.0)
Collecting dill
  Downloading dill-0.3.3-py2.py3-none-any.whl (81 kB)
     |████████████████████████████████| 81 kB 6.1 MB/s 
Collecting dynesty
  Using cached dynesty-1.0.1-py2.py3-none-any.whl (86 kB)
Collecting emcee>=3
  Using cached emcee-3.0.2-py2.py3-none-any.whl (41 kB)
Collecting iminuit>=1.2
  Downloading iminuit-1.5.4-cp38-cp38-manylinux2010_x86_64.whl (4.2 MB)
     |████████████████████████████████| 4.2 MB 125 kB/s 
Collecting ipyparallel
  Downloading ipyparallel-6.3.0-py3-none-any.whl (199 kB)
     |████████████████████████████████| 199 kB 17.7 MB/s 
Requirement already satisfied: ipython in /usr/lib/python3/dist-packages (from threeML) (7.13.0)
Requirement already satisfied: matplotlib in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from threeML) (3.3.2)
Requirement already satisfied: numba in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from threeML) (0.52.0)
Collecting numdifftools
  Downloading numdifftools-0.9.39-py2.py3-none-any.whl (953 kB)
     |████████████████████████████████| 953 kB 17.6 MB/s 
Collecting numexpr
  Downloading numexpr-2.7.1-cp38-cp38-manylinux1_x86_64.whl (164 kB)
     |████████████████████████████████| 164 kB 18.1 MB/s 
Requirement already satisfied: numpy>=1.16 in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from threeML) (1.19.2)
Requirement already satisfied: pandas in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from threeML) (1.1.3)
Requirement already satisfied: pyyaml>=5.1 in /usr/lib/python3/dist-packages (from threeML) (5.3.1)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from threeML) (2.22.0)
Requirement already satisfied: scipy>=0.18 in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from threeML) (1.5.3)
Collecting speclite<0.9
  Downloading speclite-0.8.tar.gz (599 kB)
     |████████████████████████████████| 599 kB 13.4 MB/s 
Requirement already satisfied: ultranest in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from threeML) (3.0.1)
Collecting uncertainties
  Downloading uncertainties-3.1.5-py2.py3-none-any.whl (246 kB)
     |████████████████████████████████| 246 kB 19.5 MB/s 
Requirement already satisfied: future in /usr/lib/python3/dist-packages (from astromodels->threeML) (0.18.2)
Requirement already satisfied: h5py in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from astromodels->threeML) (2.10.0)
Collecting interpolation
  Downloading interpolation-2.1.6-py3-none-any.whl (54 kB)
     |████████████████████████████████| 54 kB 627 kB/s 
Collecting tables
  Downloading tables-3.6.1-cp38-cp38-manylinux1_x86_64.whl (4.3 MB)
     |████████████████████████████████| 4.3 MB 27.7 MB/s 
Requirement already satisfied: beautifulsoup4>=4.3.2 in /usr/lib/python3/dist-packages (from astroquery->threeML) (4.8.2)
Requirement already satisfied: html5lib>=0.999 in /usr/lib/python3/dist-packages (from astroquery->threeML) (1.0.1)
Requirement already satisfied: keyring>=4.0 in /usr/lib/python3/dist-packages (from astroquery->threeML) (18.0.1)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from astroquery->threeML) (1.14.0)
Requirement already satisfied: setuptools>=40.6.0 in /usr/lib/python3/dist-packages (from corner->threeML) (45.2.0)
Requirement already satisfied: setuptools-scm in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from corner->threeML) (4.1.2)
Requirement already satisfied: wheel in /usr/lib/python3/dist-packages (from corner->threeML) (0.34.2)
Requirement already satisfied: tornado>=4 in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from ipyparallel->threeML) (6.1)
Requirement already satisfied: pyzmq>=13 in /usr/lib/python3/dist-packages (from ipyparallel->threeML) (18.1.1)
Requirement already satisfied: jupyter-client in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from ipyparallel->threeML) (6.1.7)
Requirement already satisfied: traitlets>=4.3 in /usr/lib/python3/dist-packages (from ipyparallel->threeML) (4.3.3)
Requirement already satisfied: ipython-genutils in /usr/lib/python3/dist-packages (from ipyparallel->threeML) (0.2.0)
Requirement already satisfied: python-dateutil>=2.1 in /usr/lib/python3/dist-packages (from ipyparallel->threeML) (2.7.3)
Requirement already satisfied: ipykernel>=4.4 in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from ipyparallel->threeML) (5.3.4)
Requirement already satisfied: decorator in /usr/lib/python3/dist-packages (from ipyparallel->threeML) (4.4.2)
Requirement already satisfied: pexpect in /usr/lib/python3/dist-packages (from ipython->threeML) (4.6.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /usr/lib/python3/dist-packages (from matplotlib->threeML) (2.4.6)
Requirement already satisfied: cycler>=0.10 in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from matplotlib->threeML) (0.10.0)
Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->threeML) (7.0.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from matplotlib->threeML) (1.2.0)
Requirement already satisfied: certifi>=2020.06.20 in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from matplotlib->threeML) (2020.6.20)
Requirement already satisfied: llvmlite<0.36,>=0.35.0 in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from numba->threeML) (0.35.0)
Requirement already satisfied: pytz>=2017.2 in /usr/lib/python3/dist-packages (from pandas->threeML) (2019.3)
Requirement already satisfied: cython in /usr/lib/python3/dist-packages (from ultranest->threeML) (0.29.14)
Collecting tempita>=0.5.2
  Downloading Tempita-0.5.2.tar.gz (12 kB)
Requirement already satisfied: secretstorage in /usr/lib/python3/dist-packages (from keyring>=4.0->astroquery->threeML) (2.3.1)
Requirement already satisfied: jupyter-core>=4.6.0 in /mnt/data/daten/PostDoc2/home/.local/lib/python3.8/site-packages (from jupyter-client->ipyparallel->threeML) (4.7.0)
Building wheels for collected packages: threeML, astromodels, astroquery, speclite, tempita
  Building wheel for threeML (setup.py) ... done
  Created wheel for threeML: filename=threeML-2.0.2-py3-none-any.whl size=38760619 sha256=7fc6154e4893325a1d1f929a4911f6f9e3d9ccb009e68ba1783b0aeaaaf1cfa9
  Stored in directory: /mnt/data/daten/PostDoc2/home/.cache/pip/wheels/75/dc/f9/327143aea3820dcff9fe266c82b672017c7dc2641ac30f63d3
  Building wheel for astromodels (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-irk8m1vt/astromodels/setup.py'"'"'; __file__='"'"'/tmp/pip-install-irk8m1vt/astromodels/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-meub_n88
       cwd: /tmp/pip-install-irk8m1vt/astromodels/
  Complete output (124 lines):
  
   Xspec is detected. Will compile the Xspec extension.
  
  Found library XSFunctions in /home/user/bin/xspec-6.28/x86_64-pc-linux-gnu-libc2.31/lib
  Found library XSModel in /home/user/bin/xspec-6.28/x86_64-pc-linux-gnu-libc2.31/lib
  Found library XSUtil in /home/user/bin/xspec-6.28/x86_64-pc-linux-gnu-libc2.31/lib
  Found library XS in /home/user/bin/xspec-6.28/x86_64-pc-linux-gnu-libc2.31/lib
  Found library cfitsio in None
  Found library CCfits_2.5 in /home/user/bin/xspec-6.28/x86_64-pc-linux-gnu-libc2.31/lib
  Found library wcs-5.19.1 in /home/user/bin/xspec-6.28/x86_64-pc-linux-gnu-libc2.31/lib
  Found library gfortran in None
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.8
  creating build/lib.linux-x86_64-3.8/astromodels
  copying astromodels/__init__.py -> build/lib.linux-x86_64-3.8/astromodels
  copying astromodels/_version.py -> build/lib.linux-x86_64-3.8/astromodels
  creating build/lib.linux-x86_64-3.8/astromodels/core
  copying astromodels/core/polarization.py -> build/lib.linux-x86_64-3.8/astromodels/core
  copying astromodels/core/tree.py -> build/lib.linux-x86_64-3.8/astromodels/core
  copying astromodels/core/__init__.py -> build/lib.linux-x86_64-3.8/astromodels/core
  copying astromodels/core/spectral_component.py -> build/lib.linux-x86_64-3.8/astromodels/core
  copying astromodels/core/memoization.py -> build/lib.linux-x86_64-3.8/astromodels/core
  copying astromodels/core/thread_safe_unit_format.py -> build/lib.linux-x86_64-3.8/astromodels/core
  copying astromodels/core/parameter_transformation.py -> build/lib.linux-x86_64-3.8/astromodels/core
  copying astromodels/core/parameter.py -> build/lib.linux-x86_64-3.8/astromodels/core
  copying astromodels/core/my_yaml.py -> build/lib.linux-x86_64-3.8/astromodels/core
  copying astromodels/core/serialization.py -> build/lib.linux-x86_64-3.8/astromodels/core
  copying astromodels/core/sky_direction.py -> build/lib.linux-x86_64-3.8/astromodels/core
  copying astromodels/core/cpickle_compatibility_layer.py -> build/lib.linux-x86_64-3.8/astromodels/core
  copying astromodels/core/model.py -> build/lib.linux-x86_64-3.8/astromodels/core
  copying astromodels/core/model_parser.py -> build/lib.linux-x86_64-3.8/astromodels/core
  copying astromodels/core/units.py -> build/lib.linux-x86_64-3.8/astromodels/core
  creating build/lib.linux-x86_64-3.8/astromodels/functions
  copying astromodels/functions/functions_3D.py -> build/lib.linux-x86_64-3.8/astromodels/functions
  copying astromodels/functions/__init__.py -> build/lib.linux-x86_64-3.8/astromodels/functions
  copying astromodels/functions/function.py -> build/lib.linux-x86_64-3.8/astromodels/functions
  copying astromodels/functions/functions.py -> build/lib.linux-x86_64-3.8/astromodels/functions
  copying astromodels/functions/numba_functions.py -> build/lib.linux-x86_64-3.8/astromodels/functions
  copying astromodels/functions/priors.py -> build/lib.linux-x86_64-3.8/astromodels/functions
  copying astromodels/functions/template_model.py -> build/lib.linux-x86_64-3.8/astromodels/functions
  copying astromodels/functions/apec.py -> build/lib.linux-x86_64-3.8/astromodels/functions
  copying astromodels/functions/functions_2D.py -> build/lib.linux-x86_64-3.8/astromodels/functions
  creating build/lib.linux-x86_64-3.8/astromodels/functions/dark_matter
  copying astromodels/functions/dark_matter/__init__.py -> build/lib.linux-x86_64-3.8/astromodels/functions/dark_matter
  copying astromodels/functions/dark_matter/dm_models.py -> build/lib.linux-x86_64-3.8/astromodels/functions/dark_matter
  creating build/lib.linux-x86_64-3.8/astromodels/sources
  copying astromodels/sources/particle_source.py -> build/lib.linux-x86_64-3.8/astromodels/sources
  copying astromodels/sources/__init__.py -> build/lib.linux-x86_64-3.8/astromodels/sources
  copying astromodels/sources/extended_source.py -> build/lib.linux-x86_64-3.8/astromodels/sources
  copying astromodels/sources/point_source.py -> build/lib.linux-x86_64-3.8/astromodels/sources
  copying astromodels/sources/source.py -> build/lib.linux-x86_64-3.8/astromodels/sources
  creating build/lib.linux-x86_64-3.8/astromodels/utils
  copying astromodels/utils/pretty_list.py -> build/lib.linux-x86_64-3.8/astromodels/utils
  copying astromodels/utils/valid_variable.py -> build/lib.linux-x86_64-3.8/astromodels/utils
  copying astromodels/utils/__init__.py -> build/lib.linux-x86_64-3.8/astromodels/utils
  copying astromodels/utils/angular_distance.py -> build/lib.linux-x86_64-3.8/astromodels/utils
  copying astromodels/utils/table.py -> build/lib.linux-x86_64-3.8/astromodels/utils
  copying astromodels/utils/disk_usage.py -> build/lib.linux-x86_64-3.8/astromodels/utils
  copying astromodels/utils/long_path_formatter.py -> build/lib.linux-x86_64-3.8/astromodels/utils
  copying astromodels/utils/data_files.py -> build/lib.linux-x86_64-3.8/astromodels/utils
  copying astromodels/utils/configuration.py -> build/lib.linux-x86_64-3.8/astromodels/utils
  copying astromodels/utils/io.py -> build/lib.linux-x86_64-3.8/astromodels/utils
  copying astromodels/utils/vincenty.py -> build/lib.linux-x86_64-3.8/astromodels/utils
  creating build/lib.linux-x86_64-3.8/astromodels/xspec
  copying astromodels/xspec/__init__.py -> build/lib.linux-x86_64-3.8/astromodels/xspec
  copying astromodels/xspec/factory.py -> build/lib.linux-x86_64-3.8/astromodels/xspec
  copying astromodels/xspec/xspec_settings.py -> build/lib.linux-x86_64-3.8/astromodels/xspec
  package init file 'astromodels/tests/__init__.py' not found (or not a regular file)
  creating build/lib.linux-x86_64-3.8/astromodels/tests
  copying astromodels/tests/test_load_xspec_models.py -> build/lib.linux-x86_64-3.8/astromodels/tests
  copying astromodels/tests/test_extended_source.py -> build/lib.linux-x86_64-3.8/astromodels/tests
  copying astromodels/tests/test_memoizer.py -> build/lib.linux-x86_64-3.8/astromodels/tests
  copying astromodels/tests/test_template_model.py -> build/lib.linux-x86_64-3.8/astromodels/tests
  copying astromodels/tests/test_functions.py -> build/lib.linux-x86_64-3.8/astromodels/tests
  copying astromodels/tests/test_parameter.py -> build/lib.linux-x86_64-3.8/astromodels/tests
  copying astromodels/tests/test_tree.py -> build/lib.linux-x86_64-3.8/astromodels/tests
  copying astromodels/tests/test_1D_function_values.py -> build/lib.linux-x86_64-3.8/astromodels/tests
  copying astromodels/tests/test_model.py -> build/lib.linux-x86_64-3.8/astromodels/tests
  copying astromodels/tests/test_point_source.py -> build/lib.linux-x86_64-3.8/astromodels/tests
  running egg_info
  writing astromodels.egg-info/PKG-INFO
  writing dependency_links to astromodels.egg-info/dependency_links.txt
  writing requirements to astromodels.egg-info/requires.txt
  writing top-level names to astromodels.egg-info/top_level.txt
  reading manifest file 'astromodels.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'astromodels.egg-info/SOURCES.txt'
  creating build/lib.linux-x86_64-3.8/astromodels/data
  creating build/lib.linux-x86_64-3.8/astromodels/data/dark_matter
  copying astromodels/data/dark_matter/dmSpecTab.npy -> build/lib.linux-x86_64-3.8/astromodels/data/dark_matter
  copying astromodels/data/dark_matter/gammamc_dif.dat -> build/lib.linux-x86_64-3.8/astromodels/data/dark_matter
  creating build/lib.linux-x86_64-3.8/astromodels/data/tests
  copying astromodels/data/tests/test_xspec_table_model.fits -> build/lib.linux-x86_64-3.8/astromodels/data/tests
  creating build/lib.linux-x86_64-3.8/astromodels/core/node_ctype
  copying astromodels/core/node_ctype/node_ctype.cxx -> build/lib.linux-x86_64-3.8/astromodels/core/node_ctype
  copying astromodels/xspec/LICENSE -> build/lib.linux-x86_64-3.8/astromodels/xspec
  copying astromodels/xspec/README -> build/lib.linux-x86_64-3.8/astromodels/xspec
  creating build/lib.linux-x86_64-3.8/astromodels/xspec/include
  creating build/lib.linux-x86_64-3.8/astromodels/xspec/include/sherpa
  copying astromodels/xspec/include/sherpa/array.hh -> build/lib.linux-x86_64-3.8/astromodels/xspec/include/sherpa
  copying astromodels/xspec/include/sherpa/constants.hh -> build/lib.linux-x86_64-3.8/astromodels/xspec/include/sherpa
  copying astromodels/xspec/include/sherpa/extension.hh -> build/lib.linux-x86_64-3.8/astromodels/xspec/include/sherpa
  copying astromodels/xspec/include/sherpa/fcmp.hh -> build/lib.linux-x86_64-3.8/astromodels/xspec/include/sherpa
  creating build/lib.linux-x86_64-3.8/astromodels/xspec/include/sherpa/astro
  copying astromodels/xspec/include/sherpa/astro/xspec_extension.hh -> build/lib.linux-x86_64-3.8/astromodels/xspec/include/sherpa/astro
  creating build/lib.linux-x86_64-3.8/astromodels/xspec/src
  copying astromodels/xspec/src/_xspec.cc -> build/lib.linux-x86_64-3.8/astromodels/xspec/src
  UPDATING build/lib.linux-x86_64-3.8/astromodels/_version.py
  set build/lib.linux-x86_64-3.8/astromodels/_version.py to '2.0.1'
  running build_ext
  building 'astromodels.xspec._xspec' extension
  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/astromodels
  creating build/temp.linux-x86_64-3.8/astromodels/xspec
  creating build/temp.linux-x86_64-3.8/astromodels/xspec/src
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -I/home/user/.local/lib/python3.8/site-packages/numpy/core/include -Iastromodels/xspec/include -c astromodels/xspec/src/_xspec.cc -o build/temp.linux-x86_64-3.8/astromodels/xspec/src/_xspec.o
  astromodels/xspec/src/_xspec.cc:101:10: fatal error: xsFortran.h: No such file or directory
    101 | #include "xsFortran.h"
        |          ^~~~~~~~~~~~~
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for astromodels
  Running setup.py clean for astromodels
  Building wheel for astroquery (setup.py) ... done
  Created wheel for astroquery: filename=astroquery-0.4.1-py3-none-any.whl size=3831876 sha256=f48e2b506b8af02d717b34c32a991cb6b90105350591b373ef1631cf16f47b8d
  Stored in directory: /mnt/data/daten/PostDoc2/home/.cache/pip/wheels/38/a3/2c/65f38691eef2c25e74f1ab45186b67e09cea7b59696fd67696
  Building wheel for speclite (setup.py) ... done
  Created wheel for speclite: filename=speclite-0.8-py3-none-any.whl size=191538 sha256=c290d51b9034629decc95c74d5a59fcfb5f2a5bd07e4cacf85dc94539250fab0
  Stored in directory: /mnt/data/daten/PostDoc2/home/.cache/pip/wheels/cc/9e/50/886e16ee41f37be67bc254a5c9110567f015c35e0bf47da05b
  Building wheel for tempita (setup.py) ... done
  Created wheel for tempita: filename=Tempita-0.5.2-py3-none-any.whl size=12880 sha256=d112e3e93efe9e888b5e33320b02ec3760d9c7561f28b37884b02a22cca9d563
  Stored in directory: /mnt/data/daten/PostDoc2/home/.cache/pip/wheels/b0/b9/10/fd85fe4c1e7ed2f1864865b842a4b847a897c6246033bbd3cf
Successfully built threeML astroquery speclite tempita
Failed to build astromodels
Installing collected packages: dill, tempita, interpolation, numexpr, tables, astromodels, astroquery, dynesty, emcee, iminuit, ipyparallel, numdifftools, speclite, uncertainties, threeML
    Running setup.py install for astromodels ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-irk8m1vt/astromodels/setup.py'"'"'; __file__='"'"'/tmp/pip-install-irk8m1vt/astromodels/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-qy8cl6zy/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/user/.local/include/python3.8/astromodels
         cwd: /tmp/pip-install-irk8m1vt/astromodels/
    Complete output (124 lines):
    
     Xspec is detected. Will compile the Xspec extension.
    
    Found library XSFunctions in /home/user/bin/xspec-6.28/x86_64-pc-linux-gnu-libc2.31/lib
    Found library XSModel in /home/user/bin/xspec-6.28/x86_64-pc-linux-gnu-libc2.31/lib
    Found library XSUtil in /home/user/bin/xspec-6.28/x86_64-pc-linux-gnu-libc2.31/lib
    Found library XS in /home/user/bin/xspec-6.28/x86_64-pc-linux-gnu-libc2.31/lib
    Found library cfitsio in None
    Found library CCfits_2.5 in /home/user/bin/xspec-6.28/x86_64-pc-linux-gnu-libc2.31/lib
    Found library wcs-5.19.1 in /home/user/bin/xspec-6.28/x86_64-pc-linux-gnu-libc2.31/lib
    Found library gfortran in None
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/astromodels
    copying astromodels/__init__.py -> build/lib.linux-x86_64-3.8/astromodels
    copying astromodels/_version.py -> build/lib.linux-x86_64-3.8/astromodels
    creating build/lib.linux-x86_64-3.8/astromodels/core
    copying astromodels/core/polarization.py -> build/lib.linux-x86_64-3.8/astromodels/core
    copying astromodels/core/tree.py -> build/lib.linux-x86_64-3.8/astromodels/core
    copying astromodels/core/__init__.py -> build/lib.linux-x86_64-3.8/astromodels/core
    copying astromodels/core/spectral_component.py -> build/lib.linux-x86_64-3.8/astromodels/core
    copying astromodels/core/memoization.py -> build/lib.linux-x86_64-3.8/astromodels/core
    copying astromodels/core/thread_safe_unit_format.py -> build/lib.linux-x86_64-3.8/astromodels/core
    copying astromodels/core/parameter_transformation.py -> build/lib.linux-x86_64-3.8/astromodels/core
    copying astromodels/core/parameter.py -> build/lib.linux-x86_64-3.8/astromodels/core
    copying astromodels/core/my_yaml.py -> build/lib.linux-x86_64-3.8/astromodels/core
    copying astromodels/core/serialization.py -> build/lib.linux-x86_64-3.8/astromodels/core
    copying astromodels/core/sky_direction.py -> build/lib.linux-x86_64-3.8/astromodels/core
    copying astromodels/core/cpickle_compatibility_layer.py -> build/lib.linux-x86_64-3.8/astromodels/core
    copying astromodels/core/model.py -> build/lib.linux-x86_64-3.8/astromodels/core
    copying astromodels/core/model_parser.py -> build/lib.linux-x86_64-3.8/astromodels/core
    copying astromodels/core/units.py -> build/lib.linux-x86_64-3.8/astromodels/core
    creating build/lib.linux-x86_64-3.8/astromodels/functions
    copying astromodels/functions/functions_3D.py -> build/lib.linux-x86_64-3.8/astromodels/functions
    copying astromodels/functions/__init__.py -> build/lib.linux-x86_64-3.8/astromodels/functions
    copying astromodels/functions/function.py -> build/lib.linux-x86_64-3.8/astromodels/functions
    copying astromodels/functions/functions.py -> build/lib.linux-x86_64-3.8/astromodels/functions
    copying astromodels/functions/numba_functions.py -> build/lib.linux-x86_64-3.8/astromodels/functions
    copying astromodels/functions/priors.py -> build/lib.linux-x86_64-3.8/astromodels/functions
    copying astromodels/functions/template_model.py -> build/lib.linux-x86_64-3.8/astromodels/functions
    copying astromodels/functions/apec.py -> build/lib.linux-x86_64-3.8/astromodels/functions
    copying astromodels/functions/functions_2D.py -> build/lib.linux-x86_64-3.8/astromodels/functions
    creating build/lib.linux-x86_64-3.8/astromodels/functions/dark_matter
    copying astromodels/functions/dark_matter/__init__.py -> build/lib.linux-x86_64-3.8/astromodels/functions/dark_matter
    copying astromodels/functions/dark_matter/dm_models.py -> build/lib.linux-x86_64-3.8/astromodels/functions/dark_matter
    creating build/lib.linux-x86_64-3.8/astromodels/sources
    copying astromodels/sources/particle_source.py -> build/lib.linux-x86_64-3.8/astromodels/sources
    copying astromodels/sources/__init__.py -> build/lib.linux-x86_64-3.8/astromodels/sources
    copying astromodels/sources/extended_source.py -> build/lib.linux-x86_64-3.8/astromodels/sources
    copying astromodels/sources/point_source.py -> build/lib.linux-x86_64-3.8/astromodels/sources
    copying astromodels/sources/source.py -> build/lib.linux-x86_64-3.8/astromodels/sources
    creating build/lib.linux-x86_64-3.8/astromodels/utils
    copying astromodels/utils/pretty_list.py -> build/lib.linux-x86_64-3.8/astromodels/utils
    copying astromodels/utils/valid_variable.py -> build/lib.linux-x86_64-3.8/astromodels/utils
    copying astromodels/utils/__init__.py -> build/lib.linux-x86_64-3.8/astromodels/utils
    copying astromodels/utils/angular_distance.py -> build/lib.linux-x86_64-3.8/astromodels/utils
    copying astromodels/utils/table.py -> build/lib.linux-x86_64-3.8/astromodels/utils
    copying astromodels/utils/disk_usage.py -> build/lib.linux-x86_64-3.8/astromodels/utils
    copying astromodels/utils/long_path_formatter.py -> build/lib.linux-x86_64-3.8/astromodels/utils
    copying astromodels/utils/data_files.py -> build/lib.linux-x86_64-3.8/astromodels/utils
    copying astromodels/utils/configuration.py -> build/lib.linux-x86_64-3.8/astromodels/utils
    copying astromodels/utils/io.py -> build/lib.linux-x86_64-3.8/astromodels/utils
    copying astromodels/utils/vincenty.py -> build/lib.linux-x86_64-3.8/astromodels/utils
    creating build/lib.linux-x86_64-3.8/astromodels/xspec
    copying astromodels/xspec/__init__.py -> build/lib.linux-x86_64-3.8/astromodels/xspec
    copying astromodels/xspec/factory.py -> build/lib.linux-x86_64-3.8/astromodels/xspec
    copying astromodels/xspec/xspec_settings.py -> build/lib.linux-x86_64-3.8/astromodels/xspec
    package init file 'astromodels/tests/__init__.py' not found (or not a regular file)
    creating build/lib.linux-x86_64-3.8/astromodels/tests
    copying astromodels/tests/test_load_xspec_models.py -> build/lib.linux-x86_64-3.8/astromodels/tests
    copying astromodels/tests/test_extended_source.py -> build/lib.linux-x86_64-3.8/astromodels/tests
    copying astromodels/tests/test_memoizer.py -> build/lib.linux-x86_64-3.8/astromodels/tests
    copying astromodels/tests/test_template_model.py -> build/lib.linux-x86_64-3.8/astromodels/tests
    copying astromodels/tests/test_functions.py -> build/lib.linux-x86_64-3.8/astromodels/tests
    copying astromodels/tests/test_parameter.py -> build/lib.linux-x86_64-3.8/astromodels/tests
    copying astromodels/tests/test_tree.py -> build/lib.linux-x86_64-3.8/astromodels/tests
    copying astromodels/tests/test_1D_function_values.py -> build/lib.linux-x86_64-3.8/astromodels/tests
    copying astromodels/tests/test_model.py -> build/lib.linux-x86_64-3.8/astromodels/tests
    copying astromodels/tests/test_point_source.py -> build/lib.linux-x86_64-3.8/astromodels/tests
    running egg_info
    writing astromodels.egg-info/PKG-INFO
    writing dependency_links to astromodels.egg-info/dependency_links.txt
    writing requirements to astromodels.egg-info/requires.txt
    writing top-level names to astromodels.egg-info/top_level.txt
    reading manifest file 'astromodels.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'astromodels.egg-info/SOURCES.txt'
    creating build/lib.linux-x86_64-3.8/astromodels/data
    creating build/lib.linux-x86_64-3.8/astromodels/data/dark_matter
    copying astromodels/data/dark_matter/dmSpecTab.npy -> build/lib.linux-x86_64-3.8/astromodels/data/dark_matter
    copying astromodels/data/dark_matter/gammamc_dif.dat -> build/lib.linux-x86_64-3.8/astromodels/data/dark_matter
    creating build/lib.linux-x86_64-3.8/astromodels/data/tests
    copying astromodels/data/tests/test_xspec_table_model.fits -> build/lib.linux-x86_64-3.8/astromodels/data/tests
    creating build/lib.linux-x86_64-3.8/astromodels/core/node_ctype
    copying astromodels/core/node_ctype/node_ctype.cxx -> build/lib.linux-x86_64-3.8/astromodels/core/node_ctype
    copying astromodels/xspec/LICENSE -> build/lib.linux-x86_64-3.8/astromodels/xspec
    copying astromodels/xspec/README -> build/lib.linux-x86_64-3.8/astromodels/xspec
    creating build/lib.linux-x86_64-3.8/astromodels/xspec/include
    creating build/lib.linux-x86_64-3.8/astromodels/xspec/include/sherpa
    copying astromodels/xspec/include/sherpa/array.hh -> build/lib.linux-x86_64-3.8/astromodels/xspec/include/sherpa
    copying astromodels/xspec/include/sherpa/constants.hh -> build/lib.linux-x86_64-3.8/astromodels/xspec/include/sherpa
    copying astromodels/xspec/include/sherpa/extension.hh -> build/lib.linux-x86_64-3.8/astromodels/xspec/include/sherpa
    copying astromodels/xspec/include/sherpa/fcmp.hh -> build/lib.linux-x86_64-3.8/astromodels/xspec/include/sherpa
    creating build/lib.linux-x86_64-3.8/astromodels/xspec/include/sherpa/astro
    copying astromodels/xspec/include/sherpa/astro/xspec_extension.hh -> build/lib.linux-x86_64-3.8/astromodels/xspec/include/sherpa/astro
    creating build/lib.linux-x86_64-3.8/astromodels/xspec/src
    copying astromodels/xspec/src/_xspec.cc -> build/lib.linux-x86_64-3.8/astromodels/xspec/src
    UPDATING build/lib.linux-x86_64-3.8/astromodels/_version.py
    set build/lib.linux-x86_64-3.8/astromodels/_version.py to '2.0.1'
    running build_ext
    building 'astromodels.xspec._xspec' extension
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/astromodels
    creating build/temp.linux-x86_64-3.8/astromodels/xspec
    creating build/temp.linux-x86_64-3.8/astromodels/xspec/src
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -I/home/user/.local/lib/python3.8/site-packages/numpy/core/include -Iastromodels/xspec/include -c astromodels/xspec/src/_xspec.cc -o build/temp.linux-x86_64-3.8/astromodels/xspec/src/_xspec.o
    astromodels/xspec/src/_xspec.cc:101:10: fatal error: xsFortran.h: No such file or directory
      101 | #include "xsFortran.h"
          |          ^~~~~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-irk8m1vt/astromodels/setup.py'"'"'; __file__='"'"'/tmp/pip-install-irk8m1vt/astromodels/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-qy8cl6zy/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/user/.local/include/python3.8/astromodels Check the logs for full command output.
@grburgess
Copy link
Contributor

It will detected if the HEADAS environment variable is set and then tries to load the library with ctypes. I think we need to print out more debug info when this fails and escape the failure.

Temporary solutions:

  • unset HEADAS and it will install without XSPEC
  • the conda install will automatically include XSPEC

you can also clone and try to print out some info from he setup file looking here:

https://github.com/threeML/astromodels/blob/master/setup.py#L56

and here:

https://github.com/threeML/astromodels/blob/master/setup.py#L228

@ndilalla We (?) need to write some more info for the XSPEC install.. it may be outdated, but I think we do not cover all the corner cases.

@JohannesBuchner
Copy link
Author

build_ext does not sound like ctypes, more like it is trying to compile astromodels/xspec/src/_xspec.cc against xspec headers.

@grburgess
Copy link
Contributor

I think the issue is that it finds the libs, but we currently assume the headers are in a normal place. I'm cooking up a solution now.

@grburgess
Copy link
Contributor

@JohannesBuchner Ok, I believe the issues is fixed in #137
If you checkout this branch (xspec_setup) and install manually, it should go smoothly.

@ndilalla can we speed release this one as it can easily break pip install?

@parsotat
Copy link

I have run into this issue again and the suggestion in the error message did not work for me for setting XSPEC_INC_PATH (see grburgess/ronswanson#11). what I had to do was env -u HEADAS pip install ronswanson and the package seemed to install correctly without the Xspec compatibility. I would like to be able to have that compatibility so any suggestions would be helpful

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

Successfully merging a pull request may close this issue.

3 participants