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

pip ignores --global-option and --install-options when installing from a VCS url #5518

rainwoodman opened this issue Jun 19, 2018 · 5 comments


Copy link

@rainwoodman rainwoodman commented Jun 19, 2018


  • pip version: 10.0.1
  • Python version: 3.6.5
  • OS: Linux

pip 10.0.1 ignores --install-options installing from git+git://

Likely related to


$ pip install --ignore-installed --no-deps --install-option="--prefix=/tmp/test-install" git+git://

$ ls /tmp/test-install
ls: cannot access '/tmp/test-install': No such file or directory

However, installing from zip works:

$ pip install --ignore-installed --no-deps --install-option="--prefix=/tmp/test-install"

$ ls /tmp/test-install

Expected behavior
installing from VCS shall be no different than from a zip file.

How to Reproduce
See above.


See above.

Copy link

@pradyunsg pradyunsg commented Jun 27, 2018

This looks like a bug to me. I don't have the bandwidth to investigate though. :(


Copy link

@jwhite007 jwhite007 commented Aug 25, 2018


  • pip version: 18.0
  • Python version: 3.7.0 (installed via Linuxbrew)
  • OS: Red Hat Enterprise Linux Server release 6.6 (Santiago)

Same thing happens for me using git with ssh. The following installs to Python 3.7.0's site-packages and not to <path to dir>/lib/Python3.7/site-packages/ as expected.

$ pip3 install --install-option="--prefix=<path to dir>" git+ssh://<host>:<repo>

The following does install to <path to dir>/lib/Python3.7/site-packages/ as expected

$ git clone <host>:<repo>
$ pip3 install --install-option="--prefix=<path to dir>" ./<repo>

Both installations give UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.

The former (install from git via ssh) also gives

Building wheels for collected packages: cgldb
  Running bdist_wheel for cgldb ... done
  Stored in directory: /tmp/pip-ephem-wheel-cache-z3m391el/wheels/a8/99/4d/eebf5e88bdd2909e65353b3ccc03761facab89925a55faf3f6


Copy link

@kneufeld kneufeld commented Jan 26, 2019

Can confirm that this is still an issue with pip 19.0.1 and git+https


Copy link

@cjerdonek cjerdonek commented Apr 8, 2019

Someone reported this issue again as #6379 (but for --global-option rather than --install-option).

I diagnosed it there in this comment and am copying my findings here since that issue is now closed as a duplicate:

When --global-option (or --install-option) is passed, pip disallows binaries for that requirement:

names = ["build_options", "global_options", "install_options"]
if any(map(getname, names)):
control = options.format_control
'Disabling all use of wheels due to the use of --build-options '
'/ --global-options / --install-options.', stacklevel=2,

However, when pip gets to the point where it needs to decide whether to build a wheel or fall back to using, it looks at whether it's a VCS checkout before checking whether binaries were disallowed:

if and not
# VCS checkout. Build wheel just for this run.
return True
if "binary" not in format_control.get_allowed_formats(
"Skipping bdist_wheel for %s, due to binaries "
"being disabled for it.",,
return None

So the fix should be pretty simple (just reverse those two checks, I believe).


@cjerdonek cjerdonek changed the title pip 10.0.1 ignores --install-options installing from git+git:// pip ignores --global-option and --install-options when installing from a VCS url Apr 8, 2019
Copy link

@cjerdonek cjerdonek commented Apr 8, 2019

I posted PR #6389 to address this.


@lock lock bot added the S: auto-locked label Jun 8, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

5 participants