-
Notifications
You must be signed in to change notification settings - Fork 3k
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
assertion when using --no-cache-dir in 19.0 #6158
Comments
Same thing happening with: @snstanton what base image are you using? I'm seeing a similar issue on pip v18.1 as well |
I've got the exact same issue. |
I'm seeing this even without
I should note that in my case I'm seeing it when running
Running the same commands without
Fascinatingly, if I run the same command without |
Another workaround for some situationsFor people who hit this bug because virtualenv is automatically installing the latest version of pip, you can work around it by giving virtualenv the But be aware that this may give you a very old version of pip, depending on the last time you upgraded virtualenv. This also works with tox: |
for what it's worth : it also fails with same error if package is already installed:
|
Ran into the same issue. Ended up pinning the pip version as a fix for now.
|
Issue is with failing assert, so setting env PYTHONOPTIMIZE=1 (or with parameter -O) makes this error go away. |
It looks like someone knew this might end up being an issue (source): # TODO: This check fails if --no-cache-dir is set. And yet we
# might be able to build into the ephemeral cache, surely?
building_is_possible = self._wheel_dir or (
autobuilding and self.wheel_cache.cache_dir
)
assert building_is_possible |
#5884 looks like this is a related change that could have caused this? |
Seems like the pip maintainers should rollback the recent 19 release to address this breaking change? UPDATE: not trying to cast aspersions here, was just suggesting as one way to quickly unblock people affected by this seeing as the release had just happened. Rolling forward with a hotfix works too. I appreciate the hard work of the community that supports this mission critical tooling, and agree with the sentiments below about postmortems to learn from mistakes and prevent future issues. Meanwhile, we are doing the same internally, which means a liberal amount of hardpinning |
The PR adding the TODO comment also has this comment in reply: https://github.com/pypa/pip/pull/5743/files#r215832743 Based on that comment and also the commenter above saying that passing |
Yeah, when I delete that assert, packages do install fine with |
This is also happening to my projects. I can reproduce this in Docker images built
then
fails with
but
works fine as expected. |
I'm particularly hitting this with My workaround is to use |
We also have |
isolating us from pypa/pip#6158
Software development is hard and bugs like this are always going to happen. Certainly nobody should blame the However, I would suggest that this bug merits some sort of post-mortem analysis on the part of the pip team, due to the number of (missed) opportunities for this bug to have been caught before slipping into a general release. For example:
A postmortem could result in a number of helpful betterments to ensure that software that is as core to the Python project as |
I can replicate this bug. Removing --no-cache-dir fixes it. Since I don't want it in my docker image I'm using the solution @coderanger proposed. Cheers 🌈🍰🌈 |
Earlier in the thread I had asked if including |
Adding the |
pip 19.0.1 working for me in a virtualenv. But inside Jenkins (Shining Panda) it still fails. Adding --no-use-pep517 fixes the problem |
I'm reopening since some people are still experiencing the same issue. |
pip version 19 has a bug[1] which is breaking our builds. Until it's fixed, pin pip to a pre-19 version. [1] pypa/pip#6158
When the ephemeral cache is used, the build can always occur. There is no need to check for those.
I can also confirm that |
This comment has been minimized.
This comment has been minimized.
At @pradyunsg's request, I've opened a new issue (#6197) specific to the |
Dont use pip 19.0 due to [Issue 6158](pypa/pip#6158)
or your |
they are failing because pycparser has issues with --no-cache-dir solution picked from pypa/pip#6158 (comment)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Environment
Running in a dockerfile.
Description
The following command works with pip 18.1 and fails with 19.0.
With 19.0, it fails with the following exception:
Removing the
--no-cache-dir
flag causes the install to succeed.requirements.txt
The text was updated successfully, but these errors were encountered: