pmelchior / scarlet

hyperspectral galaxy modeling and deblending
MIT License
49 stars 22 forks source link

cannot install #280

Closed cristobal-sifon closed 1 year ago

cristobal-sifon commented 1 year ago

Trying to install following the instructions I'm seeing the following error:

$ pip install .
Processing /home/cristobal/Documents/git/scarlet
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [9 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/cristobal/Documents/git/scarlet/setup.py", line 151, in <module>
          pkg_version = version.get_version()
                        ^^^^^^^^^^^^^^^^^^^^^
        File "/home/cristobal/Documents/git/scarlet/version.py", line 57, in get_version
          raise Exception("Could not find a public version of scarlet in the repo")
      Exception: Could not find a public version of scarlet in the repo
      [end of output]

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

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Same happens when I execute python setup.py install instead. I found a similar (?) issue in #237 but I checked both my git (v2.40.1) and pip (23.2.1) are up to date. I tried this, with the same results, with Python 3.7, 3.9, and 3.11.

fred3m commented 1 year ago

What system are you using? I just tested installtion from scratch in an empty environment, on a macbook pro running OS X Ventura (13.4.1), and it built just fine.

cristobal-sifon commented 1 year ago

huh. I'm using Fedora 36 on a clean conda environment (thanks for the quick reply!)

fred3m commented 1 year ago

I'm not totally sure what's going on. This versioning system was created as a band-aid because LSST was using scarlet at the time (edit: it still does, we just use the scarlet_lite package now and scarlet2 is now the new scarlet) and has a non-standard versioning model. If you want, you can just change line 151 in the setup script and instead of calling version.get_version() just change it to a string, for example `pkg_version="1.0.1+45187fd" (the latest hash). The version isn't really needed by the code, so this should be fine.

cristobal-sifon commented 1 year ago

thanks! That did the trick

fred3m commented 1 year ago

Great!