Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/18785
  
    @srowen, IIRC, I guess this should be correct when we run this as 
executable. If I understood correctly, we run `run-tests` - 
https://github.com/apache/spark/blob/master/dev/run-tests-jenkins.py#L115 which 
actually runs `run-tests.py` with `python` rather than as executable - 
https://github.com/apache/spark/blob/master/dev/run-tests#L23.
    
    I was thinking a way such as, 
    
    ```diff
    --- a/dev/run-tests
    +++ b/dev/run-tests
    @@ -20,4 +20,8 @@
     FWDIR="$(cd "`dirname $0`"/..; pwd)"
     cd "$FWDIR"
    
    -exec python -u ./dev/run-tests.py "$@"
    +PYTHON_EXECUTABLE=python
    +if hash python2.7 2>/dev/null; then
    +  PYTHON_EXECUTABLE=python2.7
    +fi
    +exec $PYTHON_EXECUTABLE -u ./dev/run-tests.py "$@"
    ```
    
    I know this bit is hard to test (existing tests indeed cover this but .. I 
guess it is rather randomly covered) but fortunately I already have an Ubuntu 
VM having `python` as Python 2.6.9. Do you mind if I take over this and CC you 
if this way makes sense to you? I guess it's easy to test for me now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to