clusterfuzz icon indicating copy to clipboard operation
clusterfuzz copied to clipboard

Virtual environment tries to use python 3.9 and fails to install deps

Open talpr opened this issue 4 years ago • 2 comments

I tried running the reproduction tool today, and got errors building the grpcio-tools (gpaste of full error). After some asking around, a colleague mentioned that they'd encountered this too, and the reason was that it was using python 3.9. Forcing the use of 3.8 in install_deps_linux.bash fixes the issues.

Not sure if this is related, but the local installation of python3 is version 3.8.7.

Diff for the (hacky) fix:

diff --git a/local/install_deps_linux.bash b/local/install_deps_linux.bash
index c72249c7..6082bbc1 100755
--- a/local/install_deps_linux.bash
+++ b/local/install_deps_linux.bash
@@ -160,7 +160,7 @@ fi

 # Setup pipenv and install python dependencies.
 $PYTHON -m pip install --user pipenv
-$PYTHON -m pipenv --python $PYTHON
+$PYTHON -m pipenv --python $PYTHON.8
 $PYTHON -m pipenv sync --dev
 source "$(${PYTHON} -m pipenv --venv)/bin/activate"

talpr avatar Feb 24 '21 02:02 talpr

can you try with export PYTHON=python3.8 does that work for you?

inferno-chromium avatar Feb 24 '21 03:02 inferno-chromium

Yes, that works too, thank you. Is there anyway to fix this in the script itself? It's is hard to tell from the error messages what the exact problem is, and that this would be the solution for it.

talpr avatar Feb 24 '21 07:02 talpr