From 095970b3456eda74ceda2f198087f90efb7af60e Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 17 Jul 2019 16:17:14 +0200 Subject: [PATCH] Fix call to pip Use sys.executable and decode the output --- pyproject_buildrequires.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject_buildrequires.py b/pyproject_buildrequires.py index 51c6791..4fe44a7 100644 --- a/pyproject_buildrequires.py +++ b/pyproject_buildrequires.py @@ -195,7 +195,8 @@ def main(argv): exit(1) freeze_output = subprocess.run( - ['pip', 'freeze', '--all'], + [sys.executable, '-I', '-m', 'pip', 'freeze', '--all'], + encoding='utf-8', stdout=subprocess.PIPE, check=True, ).stdout