diff --git a/pipenv/core.py b/pipenv/core.py index 2ec71775..295881cc 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -25,12 +25,11 @@ from pipenv.environments import ( from pipenv.patched import crayons from pipenv.project import Project from pipenv.utils import ( - convert_deps_to_pip, create_spinner, download_file, - escape_grouped_arguments, find_python, find_windows_executable, - get_canonical_names, get_source_list, is_pinned, is_python_command, - is_required_version, is_star, is_valid_url, parse_indexes, pep423_name, - prepare_pip_source_args, proper_case, python_version, run_command, - subprocess_run, venv_resolve_deps + convert_deps_to_pip, create_spinner, download_file, find_python, + find_windows_executable, get_canonical_names, get_source_list, is_pinned, + is_python_command, is_required_version, is_star, is_valid_url, + parse_indexes, pep423_name, prepare_pip_source_args, proper_case, + python_version, run_command, subprocess_run, venv_resolve_deps ) diff --git a/pipenv/project.py b/pipenv/project.py index efb1885c..47f72ea0 100644 --- a/pipenv/project.py +++ b/pipenv/project.py @@ -350,7 +350,8 @@ class Project(object): def get_environment(self, allow_global=False): # type: (bool) -> Environment is_venv = is_in_virtualenv() or is_using_venv() - if allow_global and not is_venv: + use_system = os.getenv('PIPENV_USE_SYSTEM') == '1' + if use_system or allow_global and not is_venv: prefix = sys.prefix python = sys.executable else: diff --git a/pipenv/utils.py b/pipenv/utils.py index 25dac07f..e5d947c5 100644 --- a/pipenv/utils.py +++ b/pipenv/utils.py @@ -1313,8 +1313,8 @@ def venv_resolve_deps( results = c.stdout.strip() if c.returncode == 0: sp.green.ok(environments.PIPENV_SPINNER_OK_TEXT.format("Success!")) - if not environments.is_verbose() and c.stdout.strip(): - click_echo(crayons.yellow(f"Warning: {c.stdout.strip()}"), err=True) + if not environments.is_verbose() and c.stderr.strip(): + click_echo(crayons.yellow(f"Warning: {c.stderr.strip()}"), err=True) else: sp.red.fail(environments.PIPENV_SPINNER_FAIL_TEXT.format("Locking Failed!")) click_echo(f"Output: {c.stdout.strip()}", err=True)