--target is broken

Bug #1713687 reported by anatoly techtonik on 2017-08-29
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python-pip (Ubuntu)

Bug Description

I need to install a couple of packages for a custom sys.path and it fails. Ubuntu patch modifies default `pip` behaviour to install packages into user path, but it does this with a hack. That hack unconditionally adds --user options, and it should add it only if user doesn't specify alternatives, such as --target.

$ pip install --target xxx ansible
Installing collected packages: PyYAML, MarkupSafe, jinja2, pyasn1, six, pycparser, cffi, bcrypt, idna, enum34, ipaddress, asn1crypto, cryptography, pynacl, paramiko, pycrypto, setuptools, ansible
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 360, in run
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 784, in install
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 1064, in move_wheel_files
  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 247, in move_wheel_files
  File "/usr/lib/python2.7/dist-packages/pip/locations.py", line 153, in distutils_scheme
  File "/usr/share/python-wheels/setuptools-32.3.1-py2.py3-none-any.whl/setuptools/command/install.py", line 38, in finalize_options
  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

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: python-pip 9.0.1-2
ProcVersionSignature: Ubuntu 4.10.0-33.37-generic 4.10.17
Uname: Linux 4.10.0-33-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.4-0ubuntu4.5
Architecture: amd64
CurrentDesktop: XFCE
Date: Tue Aug 29 13:05:23 2017
PackageArchitecture: all
SourcePackage: python-pip
UpgradeStatus: Upgraded to zesty on 2017-04-15 (135 days ago)

anatoly techtonik (techtonik) wrote :
dino99 (9d9) wrote :
Changed in python-pip (Ubuntu):
status: New → Invalid
anatoly techtonik (techtonik) wrote :

It is still actual for Ubuntu 17.10

Changed in python-pip (Ubuntu):
status: Invalid → New
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python-pip (Ubuntu):
status: New → Confirmed
Alek Kowalczyk (alek-kowalczyk) wrote :

Still current for 18.04

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers