pmelchior / scarlet

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

installing latest version of scarlet #237

Closed patrickaleo closed 3 years ago

patrickaleo commented 3 years ago

Hi,

I am following the directions to install the latest version of scarlet here: https://pmelchior.github.io/scarlet/install.html

Working on a computing cluster, I was able to git clone this scarlet repo. However, when I try python setup.py install, I get the following error:

python setup.py install
error: unknown option `sort=taggerdate'
usage: git tag [-a|-s|-u <key-id>] [-f] [-m <msg>|-F <file>] <tagname> [<head>]
   or: git tag -d <tagname>...
   or: git tag -l [-n[<num>]] [--contains <commit>] [--points-at <object>] 
        [<pattern>...]
   or: git tag -v <tagname>...

    -l, --list            list tag names
    -n[<n>]               print <n> lines of each tag message
    -d, --delete          delete tags
    -v, --verify          verify tags

Tag creation options
    -a, --annotate        annotated tag, needs a message
    -m, --message <message>
                          tag message
    -F, --file <file>     read message from file
    -s, --sign            annotated and GPG-signed tag
    --cleanup <mode>      how to strip spaces and #comments from message
    -u, --local-user <key id>
                          use another key to sign the tag
    -f, --force           replace the tag if exists
    --column[=<style>]    show tag list in columns

Tag listing options
    --contains <commit>   print only tags that contain the commit
    --points-at <object>  print only tags of the object

Traceback (most recent call last):
  File "/home/paleo2/ASTRODET/scarlet_source/scarlet/version.py", line 41, in get_version
    tags = subprocess.check_output(["git", "tag", "--sort=taggerdate"]).decode("utf-8").split("\n")[:-1]
  File "/home/paleo2/.conda/envs/astro-det-scarlet/lib/python3.7/subprocess.py", line 411, in check_output
    **kwargs).stdout
  File "/home/paleo2/.conda/envs/astro-det-scarlet/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'tag', '--sort=taggerdate']' returned non-zero exit status 129.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/paleo2/ASTRODET/scarlet_source/scarlet/version.py", line 21, in get_public_version
    f = open('_version.txt')
FileNotFoundError: [Errno 2] No such file or directory: '_version.txt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 141, in <module>
    pkg_version = version.get_version()
  File "/home/paleo2/ASTRODET/scarlet_source/scarlet/version.py", line 44, in get_version
    return get_public_version()
  File "/home/paleo2/ASTRODET/scarlet_source/scarlet/version.py", line 29, in get_public_version
    raise Exception(msg)
Exception: Could not find either a git repo or pre-installed version.This should never happen, please open an issue at www.github.com/pmelchior/scarlet so that it can be corrected.

There is no _version.txt in the repo, which is throwing the error.

N.B. I was able to workaround and git checkout version 1.0.1 and install from there in a virtual env, but that version's code is very different from the current GitHub repo and makes following your quick guide tutorial here (https://pmelchior.github.io/scarlet/0-quickstart.html) virtually impossible. And so I do not want to use verision 1.0.1 because it seems like an older version of the code, and I would like to use the version where I can follow the quick start guide.

Any help is greatly appreciated. Thanks!!

fred3m commented 3 years ago

What version of git are you using? _version.txt is something that is created during the setup, but it looks like you have an old version of git (pre git 2.) that doesn't support the commands needed to generate the version from the git tags.

patrickaleo commented 3 years ago

Ah you are correct, I am using git version 1.8.3.1.

patrickaleo commented 3 years ago

Upgraded Git and got it downloaded, thank you!