pip: --target does not work with --user
On Ubuntu 16.04, pip 8.1.1, --user is default, and --target does not work. Is there any reason to not just have an explicit command line argument --target override implicit --user? Needed for a setup-requires shim.
File "/usr/lib/python2.7/distutils/command/install.py", line 289, in finalize_options
raise DistutilsOptionError("can't combine user with prefix, "
DistutilsOptionError: can't combine user with prefix, exec_prefix/home, or install_(plat)base
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 8
- Comments: 15 (9 by maintainers)
Links to this issue
Commits related to this issue
- updating pip invocation to avoid https://github.com/pypa/pip/issues/3826 — committed to osrf/uctf by tfoote 8 years ago
- [core, launcher] Workaround for Debian pip quirk Checks if the --system parameter exists; if so, use it. See https://github.com/pypa/pip/issues/3826#issuecomment-232115009 — committed to calebj/Red-DiscordBot by calebj 7 years ago
- Debian 9 introduced patch into pip, which auto-adds "--user" parameter to pip, which cannot work with "--target". Therefore, "make" fails on current Debian stable (Stretch, 9). Just adding "--system" ... — committed to haimgel/haaska by haimgel 7 years ago
- fix pip issue for building on ubuntu host environment - related to https://github.com/pypa/pip/issues/3826 — committed to fritzprix/TachyOS by ZHcubGVlQHNrLmNvbSAK 5 years ago
- bug fix for building on ubuntu host environment - related to : https://github.com/pypa/pip/issues/3826 — committed to fritzprix/cdsl by ZHcubGVlQHNrLmNvbSAK 5 years ago
What is the workaround? I want target to take precedence and ignore any other inputs. Hmm.
pip install -r requirements.txt -t lib/– OK, found the workaround. It’s adding --system sopip install -r requirements.txt --system -t lib/thx!Got bitten by this today (Debian 9), officially Debian mentions #1668 as reason of applying this patch. The official work-around is to use the
--systemparameter to disable--user, but that will break whenever Debian’spip3is not used. 😡well, its more of an ubuntu bug, they blindly patch things and then the world breaks ^^
I am having the same issue on
Ubuntu 18.04.1 LTS, but it is working with--systemflag.requirements:
Exception:
Yea, I told Debian/Ubuntu not to apply said patch until we got all the issues worked out with it, they didn’t want to wait on that. You’ll need to raise the issue with them since their patch is causing the issue.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=830892
@dholth could you link to the issue on debian?