jonkeane commented on code in PR #43970:
URL: https://github.com/apache/arrow/pull/43970#discussion_r1755703896


##########
ci/docker/linux-apt-r.dockerfile:
##########
@@ -81,9 +77,22 @@ RUN cat /arrow/ci/etc/rprofile >> $(R 
RHOME)/etc/Rprofile.site
 # Also ensure parallel compilation of C/C++ code
 RUN echo "MAKEFLAGS=-j$(R -s -e 'cat(parallel::detectCores())')" >> $(R 
RHOME)/etc/Renviron.site
 
-# Set up Python 3 and its dependencies
-RUN ln -s /usr/bin/python3 /usr/local/bin/python && \
-    ln -s /usr/bin/pip3 /usr/local/bin/pip
+ARG ubuntu
+ARG python="3.12"
+COPY ci/scripts/install_python.sh /arrow/ci/scripts/
+# Need Python to check py-to-r bridge. Ubuntu 20.04 uses
+# python 3.8 which is unsuported for pyarrow
+RUN if [ "${ubuntu}" = "20.04" ]; then \
+        /arrow/ci/scripts/install_python.sh linux ${python}; \
+    else \
+        apt update ${quiet} && \
+        apt-get install -y \
+            python3 \
+            python3-pip \
+            python3-dev && \
+        apt clean && \
+        rm -rf /var/lib/apt/lists/* \
+    ; fi

Review Comment:
   Is it possible for us to move this back up to lines 58-62. I suspect there's 
some interplay with this and those tests that is making is such that python 
isn't available (that's the error message you're seeing).
   
   Would it be possible to revert this bit and bump the R force tests to use 
24.04 (since that's now our default). That might be as simple as changing this 
one line: 
https://github.com/apache/arrow/blob/d6198c038ef35481d6f0969ab8419efc004b0f7d/.github/workflows/r.yml#L126
 



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to