wangyum commented on issue #26844: [SPARK-30211][INFRA] Switch python to python3 in make-distribution.sh URL: https://github.com/apache/spark/pull/26844#issuecomment-564398451 @dongjoon-hyun It seems we also need to update our Docker image. May be it should be: ```diff diff --git a/dev/create-release/spark-rm/Dockerfile b/dev/create-release/spark-rm/Dockerfile index cc7da152c7b..eabf3a3b6c8 100644 --- a/dev/create-release/spark-rm/Dockerfile +++ b/dev/create-release/spark-rm/Dockerfile @@ -62,14 +62,14 @@ RUN apt-get clean && apt-get update && $APT_INSTALL gnupg ca-certificates && \ curl -sL https://deb.nodesource.com/setup_11.x | bash && \ $APT_INSTALL nodejs && \ # Install needed python packages. Use pip for installing packages (for consistency). - $APT_INSTALL libpython2.7-dev libpython3-dev python-pip python3-pip && \ - pip install $BASE_PIP_PKGS && \ - pip install $PIP_PKGS && \ + $APT_INSTALL libpython3-dev python3-pip && \ + pip3 install $BASE_PIP_PKGS && \ + pip3 install $PIP_PKGS && \ cd && \ virtualenv -p python3 /opt/p35 && \ . /opt/p35/bin/activate && \ - pip install $BASE_PIP_PKGS && \ - pip install $PIP_PKGS && \ + pip3 install $BASE_PIP_PKGS && \ + pip3 install $PIP_PKGS && \ # Install R packages and dependencies used when building. # R depends on pandoc*, libssl (which are installed above). $APT_INSTALL r-base r-base-dev && \ ``` or ```diff diff --git a/dev/create-release/spark-rm/Dockerfile b/dev/create-release/spark-rm/Dockerfile index cc7da152c7b..a5af73cc25c 100644 --- a/dev/create-release/spark-rm/Dockerfile +++ b/dev/create-release/spark-rm/Dockerfile @@ -61,8 +61,16 @@ RUN apt-get clean && apt-get update && $APT_INSTALL gnupg ca-certificates && \ pandoc pandoc-citeproc libssl-dev libcurl4-openssl-dev libxml2-dev && \ curl -sL https://deb.nodesource.com/setup_11.x | bash && \ $APT_INSTALL nodejs && \ + # Change default python to python3.6 + update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 && \ + update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2 && \ + update-alternatives --set python /usr/bin/python3.6 && \ + # Change default pip to pip3 + update-alternatives --install /usr/bin/pip pip /usr/bin/pip 1 && \ + update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 2 && \ + update-alternatives --set pip /usr/bin/pip3 && \ # Install needed python packages. Use pip for installing packages (for consistency). - $APT_INSTALL libpython2.7-dev libpython3-dev python-pip python3-pip && \ + $APT_INSTALL libpython3-dev python3-pip && \ pip install $BASE_PIP_PKGS && \ pip install $PIP_PKGS && \ cd && \ ``` I will verify it later.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
