Running ./dev/run-tests with python3 as the default gives this error at the Building Spark stage:
This is because in Python 3, the stdout member of a POpen object defaults to returning a byte stream, and exec_sbt tries to read it as a text screen. This can be fixed by specifying universal_newlines=True when creating the POpen object. I notice that the hashbang at the start of run-tests.py says to run with python2, so I am not sure how much of the rest of it is Python 3 compatible, but this is the first error I've run into. It ran with python 3 because run-tests runs run-tests.py using the default Python, which on my system is Python 3. Not sure whether the better solution here is to try and fix Python 3 compatibility in run-tests.py or set run-tests to use Python 2.