diff --git a/src/python/grpcio/support.py b/src/python/grpcio/support.py index 7ee72da46b0..217f3cb9ed5 100644 --- a/src/python/grpcio/support.py +++ b/src/python/grpcio/support.py @@ -37,7 +37,12 @@ Could not find . This could mean the following: * You're on Windows and your Python installation was somehow corrupted (check your environment variables or try re-installing?) """ -PYTHON_REPRESENTATION = 'python' if sys.version_info[0] == 2 else 'python3' +if sys.version_info[0] == 2: + PYTHON_REPRESENTATION = 'python' +elif sys.version_info[0] == 3: + PYTHON_REPRESENTATION = 'python3' +else: + raise NotImplementedError('Unsupported Python version: %s' % sys.version) C_CHECKS = { C_PYTHON_DEV: