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

Installing Qip dependencies in editable mode will always remove existing distribution #12

Open
buddly27 opened this issue Sep 28, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@buddly27
Copy link
Contributor

It seems impossible to install a Python library used by Qip in editable mode without removing existing distribution:

>>> qip install -e /path/to/wiz.
debug: python -m pip install --ignore-installed --no-deps --prefix /var/folders/66/yybg1n7n0m90xltv6c356gm0000538/T/tmp8a7r61ko --no-warn-script-location --disable-pip-version-check --cache-dir /var/folders/66/yybg1n7n0m90xltv6c356gm0000538/T/tmpnpvdbbsx -e '.'
debug: Obtaining file:///Users/jeremyr/dev/github/wiz
debug: Installing collected packages: wiz-env
debug:   Found existing installation: wiz-env 3.2.5
debug:     Uninstalling wiz-env-3.2.5:
debug:       Successfully uninstalled wiz-env-3.2.5
debug:   Running setup.py develop for wiz-env
debug: Successfully installed wiz-env
debug: python /Users/jeremyr/dev/github/qip/source/qip/package_data/package_info.py wiz-env
debug: python -m pip show --disable-pip-version-check 'wiz-env' -v
debug: Dependencies: click<8,>=7 colorama<1,>=0.3.9 distro<2,>=1.5.0 packaging<18,>=17.1 pystache<1,>=0.5.4 sawmill<1,>=0.2.1 six<2,>=1.15.0 toml<1,>=0.10.1 ujson<4,>=2.0.3
Traceback (most recent call last):
  File "/Users/jeremyr/.virtualenvs/qip-p38/bin/qip", line 33, in <module>
    sys.exit(load_entry_point('qip-installer', 'console_scripts', 'qip')())
  File "/Users/jeremyr/dev/github/qip/source/qip/__main__.py", line 8, in main
    qip.command_line.main(prog_name="qip")
  File "/Users/jeremyr/.virtualenvs/qip-p38/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Users/jeremyr/.virtualenvs/qip-p38/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/jeremyr/.virtualenvs/qip-p38/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/jeremyr/.virtualenvs/qip-p38/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/jeremyr/.virtualenvs/qip-p38/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/jeremyr/dev/github/qip/source/qip/command_line.py", line 178, in install
    success = qip.install(
  File "/Users/jeremyr/dev/github/qip/source/qip/__init__.py", line 122, in install
    package_mapping, overwrite = _install(
  File "/Users/jeremyr/dev/github/qip/source/qip/__init__.py", line 251, in _install
    custom_definition = qip.definition.fetch_custom(package_mapping)
  File "/Users/jeremyr/dev/github/qip/source/qip/definition.py", line 91, in fetch_custom
    package_mapping["location"], package_mapping["module_name"],
KeyError: 'location'

It seems to be due to Pip not taking the --ignore-installed option into account when installing packages in editable mode:
https://stackoverflow.com/questions/64108932/pip-install-in-editable-mode-always-uninstall-existing-distribution

@buddly27 buddly27 added the bug Something isn't working label Sep 28, 2020
@buddly27
Copy link
Contributor Author

Traceback is due to another issue:
#13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant