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

Fix problem with pip 21.3 that prevents installation from source #2344

Merged
merged 2 commits into from
Oct 20, 2021
Merged

Conversation

zklaus
Copy link

@zklaus zklaus commented Oct 12, 2021

Description

This addresses an upstream bug in pip by pinning to avoid the buggy version. Compare with the sibling PR in ESMValCore at ESMValGroup/ESMValCore#1359.


Before you get started

Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.


To help with the number of pull requests:

@bouweandela bouweandela changed the title Test fix Fix problem with pip 21.3 that prevents installation from source Oct 15, 2021
@valeriupredoi
Copy link
Contributor

seems like conda is unable to solve the environment in practical time (I reran the test just to make sure it wasn't a fluke). Maybe we should call mamba instead or put the pin in setup.py as install requirement?

@valeriupredoi
Copy link
Contributor

I was silly when I said we should pin it in setup.py - it's the old chicken and egg problem - putting it in there would mean the pip that runs the install doesn't know about it, and goes ahead with the setup, only to fail since it's 21.3 and it poops the bed. The pip that runs the install can be throttled from project.toml and as it is now, it needs to look for an alternative to 21.3, and it indeed does so: when running pip install -e .[develop] -vv:

  Running command /home/valeriu/miniconda3-fresh/envs/esmvaltool-stock/bin/python3.9 /tmp/pip-standalone-pip-6dsry2mg/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-f0lqpnit/overlay --no-warn-script-location -v --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'pip != 21.3' 'setuptools >= 40.6.0' wheel
  Using pip 21.3 from /tmp/pip-standalone-pip-6dsry2mg/__env_pip__.zip/pip (python 3.9)
  Collecting pip!=21.3
    Using cached pip-21.2.4-py3-none-any.whl (1.6 MB)
  Collecting setuptools>=40.6.0
    Using cached setuptools-58.2.0-py3-none-any.whl (946 kB)
  Collecting wheel
    Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)

@zklaus
Copy link
Author

zklaus commented Oct 19, 2021

Sorry V, I am overriding your suggestions here. Conda should get us the right pip.

@valeriupredoi
Copy link
Contributor

sure, I agree, unlike with conda, using mamba solves the env with pip restricted in environment.yml in a matter of seconds (just tried now), but I think installation dependencies should stay in pyproject.toml - although am not 100% sure of that, so I'll leave it to you 👍

@zklaus zklaus merged commit 1a92457 into main Oct 20, 2021
@zklaus zklaus deleted the test-fix branch October 20, 2021 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

With pip 21.3, pip install -e doesn't work
2 participants