Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Anaconda Cloud Developer Installation requires git #59

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

Open
dihm opened this issue Apr 16, 2021 · 4 comments
Open

Anaconda Cloud Developer Installation requires git #59

dihm opened this issue Apr 16, 2021 · 4 comments

Comments

@dihm
Copy link
Contributor

dihm commented Apr 16, 2021

Needed to redo an environment today and was working through the instructions. The setuptools-conda install-requirements command fails because it can't find git.

Traceback (most recent call last):
  File "setup.py", line 9, in <module>
    setup(use_scm_version=VERSION_SCHEME)
  File "C:\Users\naqsL\Miniconda3\envs\labscript\lib\site-packages\setuptools\__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\naqsL\Miniconda3\envs\labscript\lib\distutils\core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "C:\Users\naqsL\Miniconda3\envs\labscript\lib\site-packages\setuptools\dist.py", line 432, in __init__
    _Distribution.__init__(self, {
  File "C:\Users\naqsL\Miniconda3\envs\labscript\lib\distutils\dist.py", line 292, in __init__
    self.finalize_options()
  File "C:\Users\naqsL\Miniconda3\envs\labscript\lib\site-packages\setuptools\dist.py", line 708, in finalize_options
    ep(self)
  File "C:\Users\naqsL\Miniconda3\envs\labscript\lib\site-packages\setuptools\dist.py", line 715, in _finalize_setup_keywords
    ep.load()(self, ep.name, value)
  File "C:\Users\naqsL\Miniconda3\envs\labscript\lib\site-packages\setuptools_scm\integration.py", line 24, in version_keyword
    dist.metadata.version = _get_version(config)
  File "C:\Users\naqsL\Miniconda3\envs\labscript\lib\site-packages\setuptools_scm\__init__.py", line 173, in _get_version
    parsed_version = _do_parse(config)
  File "C:\Users\naqsL\Miniconda3\envs\labscript\lib\site-packages\setuptools_scm\__init__.py", line 127, in _do_parse
    version = _version_from_entrypoints(config) or _version_from_entrypoints(
  File "C:\Users\naqsL\Miniconda3\envs\labscript\lib\site-packages\setuptools_scm\__init__.py", line 65, in _version_from_entrypoints
    version = _call_entrypoint_fn(root, config, ep.load())
  File "C:\Users\naqsL\Miniconda3\envs\labscript\lib\site-packages\setuptools_scm\__init__.py", line 46, in _call_entrypoint_fn
    return fn(root, config=config)
  File "C:\Users\naqsL\Miniconda3\envs\labscript\lib\site-packages\setuptools_scm\git.py", line 115, in parse
    require_command("git")
  File "C:\Users\naqsL\Miniconda3\envs\labscript\lib\site-packages\setuptools_scm\utils.py", line 142, in require_command
    raise OSError("%r was not found" % name)
OSError: 'git' was not found

Fix is to add git to the conda install line just above it.

@chrisjbillington
Copy link
Member

You obtained the repositories without git?

@dihm
Copy link
Contributor Author

dihm commented Apr 16, 2021

Fair enough. I was reinstalling existing repositories so I skipped the cloning steps without even thinking about them. Not exactly a common situation.

I suppose someone could pull down the repos with a git that isn't in their labscript environment (like sublime merge or the github desktop client), but that still probably doesn't justify making changes. I'll go ahead and close.

@dihm dihm closed this as completed Apr 16, 2021
@chrisjbillington
Copy link
Member

Fair enough that the user might not always have git installed, or at least that it might not be accessible on the command line.

Probably worth a comment in the documentation saying that the git command must be available and can be installed with 'conda install git' if you don't have it already.

@dihm
Copy link
Contributor Author

dihm commented Apr 19, 2021

That would certainly be sufficient. I also just realized that the current instructions use git in a different environment than the one where labscript is to be installed. So for it to work as written, git either has to be globally installed on the system or previously installed into the py38 environment. That's something that would probably continue to get me in the future since I only install git via conda environments or sublime merge without some minor comment.

Ideally it would be nice if git were just defined as a dependency of something else, but that doesn't seem very likely to happen since git is only an implicit dependency of setuptools_scm (that isn't strictly enforced since one could also use mercurial) because of how the labscript modules are set up.

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

2 participants