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

astrocats cannot import catalogs when installed with Anaconda #91

Closed
Zeklandia opened this issue Jun 10, 2018 · 3 comments
Closed

astrocats cannot import catalogs when installed with Anaconda #91

Zeklandia opened this issue Jun 10, 2018 · 3 comments
Assignees

Comments

@Zeklandia
Copy link

Attempting to import a catalog fails because the base directory of astrocats is not a Git repository.

$ python -m astrocats supernovae import
fatal: not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
  File ".../anaconda3/envs/astro3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File ".../anaconda3/envs/astro3/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File ".../anaconda3/envs/astro3/lib/python3.6/site-packages/astrocats/__main__.py", line 6, in <module>
    main.main()
  File ".../anaconda3/envs/astro3/lib/python3.6/site-packages/astrocats/main.py", line 28, in main
    args, sub_clargs = load_command_line_args()
  File ".../anaconda3/envs/astro3/lib/python3.6/site-packages/astrocats/main.py", line 163, in load_command_line_args
    git_vers = get_git()
  File ".../anaconda3/envs/astro3/lib/python3.6/site-packages/astrocats/main.py", line 301, in get_git
    git_vers = subprocess.check_output(["git", "describe", "--always"]).strip()
  File ".../anaconda3/envs/astro3/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File ".../anaconda3/envs/astro3/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'describe', '--always']' returned non-zero exit status 128.
@guillochon
Copy link
Member

From the other issue you opened I'm assuming you got this working?

@Zeklandia
Copy link
Author

Zeklandia commented Jun 11, 2018

No, I uninstalled the Anaconda version and cloned the repo directly. I couldn't get it to work installed with Anaconda.

@lzkelley
Copy link
Member

Hi @Zeklandia, sorry for the super slow response. I don't think astrocats is able to function when installed via Anaconda at the moment (actually: with the current structure of the code, in general). The anaconda installed astrocats will only work as a library dependency (e.g. providing class structures for mosfit) at the moment. I'll add a warning to this in the docs, thanks for pointing it out. The only solution, for the moment, is to install via git and use that. Hopefully everything is working fine for you now. One thing to be aware of is that you may be working with numerous versions of astrocats at the moment, one via anaconda which is used in import statements from other packages, and another version via git that used directly for catalogs.

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

No branches or pull requests

3 participants