pip: have_directory_for_build AssertionError when installing with --no-cache-dir (19.0.1)
- pip version: 19.0.1
With the 19.0.1 release, some people are still reporting an AssertionError
when installing with --no-cache-dir
similar to the one in #6158. This issue is for the 19.0.1-specific issue as it is narrower in scope.
Here are details for a couple reports: https://github.com/pypa/pip/issues/6158#issuecomment-456882072 and https://github.com/pypa/pip/issues/6158#issuecomment-456949839
The traceback looks like this:
Exception:
Traceback (most recent call last):
File "/mnt/jenkins/workspace/venv/local/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 176, in main
status = self.run(options, args)
File "/mnt/jenkins/workspace/venv/local/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 346, in run
session=session, autobuilding=True
File "/mnt/jenkins/workspace/venv/local/lib/python2.7/site-packages/pip/_internal/wheel.py", line 886, in build
assert have_directory_for_build
AssertionError
Some work-arounds (feel free to add to the list):
- Use pip version 18.1.
- Pass
--no-use-pep517
in your invocation. - See issue #6158 for some other possibilities.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 26
- Comments: 18 (10 by maintainers)
Commits related to this issue
- Workaround for pip problem in docker https://github.com/pypa/pip/issues/6197 — committed to geokrety/geokrety-api by kumy 5 years ago
- Workaround for pip problem in docker https://github.com/pypa/pip/issues/6197 — committed to geokrety/geokrety-api by kumy 5 years ago
- Workaround for pip problem in docker https://github.com/pypa/pip/issues/6197 — committed to geokrety/geokrety-api by kumy 5 years ago
- Workaround for pip problem in docker https://github.com/pypa/pip/issues/6197 — committed to geokrety/geokrety-api by kumy 5 years ago
- Fixed storage Dockerfile image build: - Added workaround for https://github.com/pypa/pip/issues/6197 - Froze python2 requirements (virtualenv py2.7 would fail to install numpy) — committed to pcrespov/osparc-simcore by deleted user 5 years ago
- Work around bug in pip Issue described here: https://github.com/pypa/pip/issues/6197 — committed to raymondEhlers/OVERWATCH by raymondEhlers 5 years ago
- Is539/master build fails (#540) * minor cleanup * Fixed storage Dockerfile image build: - Added workaround for https://github.com/pypa/pip/issues/6197 - Froze python2 requirements (virtualenv ... — committed to ITISFoundation/osparc-simcore by pcrespov 5 years ago
- Testing solution from https://github.com/pypa/pip/issues/6197 — committed to WoTTsecurity/agent-balena by vpetersson 5 years ago
- Ensure we use PIP 18.1 in the Docker build because of https://github.com/pypa/pip/issues/6197 — committed to pgadmin-org/pgadmin4 by dpage 5 years ago
- Lock pip at 18.0 to address build failures https://github.com/pypa/pip/issues/6197 — committed to getsentry/zeus by dcramer 5 years ago
- docker/dockerfile:Updated dockerfile With the recent update to pip 19.01 there was a build slight issue with the docker commands, refer here: https://github.com/pypa/pip/issues/6197 — committed to sladyn98/conpot by deleted user 5 years ago
- docker/dockerfile:Updated dockerfile With the recent update to pip 19.01 there was a build slight issue with the docker commands, refer here: https://github.com/pypa/pip/issues/6197 — committed to sladyn98/conpot by deleted user 5 years ago
- updated dockerfile (#429) - related (#428) With the recent update to pip 19.01 there was a build slight issue with the docker commands, refer here: https://github.com/pypa/pip/issues/6197 — committed to mushorg/conpot by deleted user 5 years ago
- Workaround to pip bug Recent builds failed to a pip bug. Revert this commit once we use pip 19.0.2 (see https://github.com/pypa/pip/issues/6197#issuecomment-459947065). — committed to Tecnativa/docker-duplicity by yajo 5 years ago
- Bring in repo2docker changes to work around pip bug The latest version of pip (19.0.2) have a bug related to cache dirs https://github.com/pypa/pip/issues/6197 — committed to betatim/mybinder.org-deploy by betatim 5 years ago
- remove pip downgrade, issue is fixed (pypa/pip#6197) — committed to hoellen/dockerfiles by hoellen 5 years ago
- fix(docker): Avoid pip 19.0.1 bug Why: * build was failing as described in https://github.com/pypa/pip/issues/6197 This change addreses the need by: * force upgrade of pip as that makes it at le... — committed to home-assistant-ecosystem/home-assistant-cli by maxandersen 5 years ago
- upgrade pip to circumvent https://github.com/pypa/pip/issues/6197 — committed to Syncano/syncano-platform by 23doors 5 years ago
- Differentiate between eu1 and us1 hosting cnames (#31) * Differentiate between eu1 and us1 hosting cnames * upgrade pip to circumvent https://github.com/pypa/pip/issues/6197 * typo * lint — committed to Syncano/syncano-platform by 23doors 5 years ago
- Merge #1726 #1732 1726: Update python:3.7-slim Docker digest to 8a125f6 r=peterbe a=renovate[bot] This PR contains the following updates: | Package | Update | Change | |---|---|---| | python | dige... — committed to mozilla/normandy by bors[bot] 5 years ago
pip 19.0.2 has been released with a fix for this.
Easily reproducable in docker:
@cjerdonek figured out a nice fix for this in #6219 and that’s now merged. I’ll make a 19.0.2 in the coming week, with that fix and more.
I’ll go ahead and close this issue. I’ll ping here when the release is made.
Same but Python 3.7
Reverting to pip 18.1 worked for me.
@pradyunsg May be worth pinning this one as well, as I ran into it while trying to test the PRs for #6163 (see https://github.com/pypa/pip/pull/6212#issuecomment-458166386)
Could you provide us a reproducing case for this issue?
@pfmoore I ran into this myself, basically just passing
--no-cache
breaks pip when discovering and installing a PEP-517 package. We need either to fallback to disable PEP-517 build, or instead use the TMPDIR env var.Hitting this from jython that does not support pip cache mechanism inside virtualenv.