[build]: Upgrade pip3 before pip2 (#5743)
Upgrading pip3 after pip2 caused the pip command to be aliased to the pip3 command. However, since we are still transitioning from Python 2 to Python 3, most pip commands in the codebase are expecting pip to alias to pip2. The proper solution here is to explicitly call pip2 and pip3, and no longer call pip, however this will require extensive changes and testing, so to quickly fix this issue, we upgraded pip2 after pip3 to ensure that pip2 is installed after pip3.
This commit is contained in:
parent
6145e4f6f1
commit
b132ca0980
@ -15,8 +15,8 @@ RUN apt-get update && \
|
||||
python-setuptools \
|
||||
python3-setuptools
|
||||
|
||||
RUN pip2 install --upgrade pip
|
||||
RUN pip3 install --upgrade pip
|
||||
RUN pip2 install --upgrade pip
|
||||
RUN apt-get purge -y python-pip python3-pip
|
||||
|
||||
# For sonic-config-engine Python 3 package
|
||||
|
@ -334,8 +334,8 @@ RUN export VERSION=1.14.2 \
|
||||
&& echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/bash.bashrc \
|
||||
&& rm go$VERSION.linux-*.tar.gz
|
||||
|
||||
RUN pip2 install --upgrade pip
|
||||
RUN pip3 install --upgrade pip
|
||||
RUN pip2 install --upgrade pip
|
||||
RUN apt-get purge -y python-pip python3-pip
|
||||
|
||||
# For building Python packages
|
||||
|
@ -330,8 +330,8 @@ RUN export VERSION=1.14.2 \
|
||||
&& echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/bash.bashrc \
|
||||
&& rm go$VERSION.linux-*.tar.gz
|
||||
|
||||
RUN pip2 install --upgrade pip
|
||||
RUN pip3 install --upgrade pip
|
||||
RUN pip2 install --upgrade pip
|
||||
RUN apt-get purge -y python-pip python3-pip
|
||||
|
||||
# For p4 build
|
||||
|
Loading…
Reference in New Issue
Block a user