bd-j / prospector

Python code for Stellar Population Inference from Spectra and SEDs
http://prospect.readthedocs.io
MIT License
157 stars 73 forks source link

Error Installing Ultranest #290

Closed thnousias closed 1 year ago

thnousias commented 1 year ago

I am trying to install ultranest and I am getting the following error:

efaulting to user installation because normal site-packages is not writeable Collecting ultranest Using cached ultranest-3.6.1.tar.gz (21.5 MB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [38 lines of output]

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
              # only consider points in the same cluster
              if clusterids[j] == clusterids[i]:
                  pair_dist = 0.0
                  for k in range(ndim):
                      pair_dist += (pts[i,k] - pts[j,k])**2
                  total_dist += pair_dist**0.5
                  ^
  ------------------------------------------------------------

  ultranest/mlfriends.pyx:180:16: Cannot assign type 'npy_double complex' to 'float_t'
  Compiling ultranest/mlfriends.pyx because it changed.
  Compiling ultranest/stepfuncs.pyx because it changed.
  [1/2] Cythonizing ultranest/mlfriends.pyx
  Traceback (most recent call last):
    File "/home/thnousias/.local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/home/thnousias/.local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/thnousias/.local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-i8udsciz/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "/tmp/pip-build-env-i8udsciz/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 323, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-i8udsciz/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 487, in run_setup
      super(_BuildMetaLegacyBackend,
    File "/tmp/pip-build-env-i8udsciz/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 338, in run_setup
      exec(code, locals())
    File "<string>", line 58, in <module>
    File "/tmp/pip-build-env-i8udsciz/overlay/local/lib/python3.10/dist-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
      cythonize_one(*args)
    File "/tmp/pip-build-env-i8udsciz/overlay/local/lib/python3.10/dist-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: ultranest/mlfriends.pyx
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

I have updated pip, wheel and setuptools. I did not have this issue with other packages like emcee.

I would appreciate any help. Apologies if I am posting in the wrong place.

bd-j commented 1 year ago

Hi, this sounds like an issue for ultranest: https://github.com/JohannesBuchner/ultranest/issues