From bca81b97ad8aeeb6649742ba380ac068fa3705b0 Mon Sep 17 00:00:00 2001 From: Jace Browning Date: Thu, 26 Jan 2017 16:57:46 -0500 Subject: [PATCH] Prevent invalid shebangs with Homebrew Python Fixes https://github.com/kennethreitz/pipenv/issues/98 --- pipenv/cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pipenv/cli.py b/pipenv/cli.py index 3bf3ac09..b6723a84 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -440,6 +440,8 @@ def do_init(dev=False, requirements=False, skip_virtualenv=False, allow_global=F def pip_install(package_name=None, r=None, allow_global=False): + # Prevent invalid shebangs with Homebrew-installed Python: https://bugs.python.org/issue22490 + os.environ.pop('__PYVENV_LAUNCHER__', None) if r: c = delegator.run('{0} install -r {1} --require-hashes -i {2}'.format(which_pip(allow_global=allow_global), r, project.source['url'])) else: