Skip to content

Commit

Permalink
[201911] Fix easy_install error when installing pip (sonic-net#7272)
Browse files Browse the repository at this point in the history
see below error:

+ sudo https_proxy= LANG=C chroot ./fsroot easy_install pip==20.3.3
Searching for pip==20.3.3
Reading https://pypi.python.org/simple/pip/
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or working download links found for pip==20.3.3
error: Could not find suitable distribution for Requirement.parse('pip==20.3.3')

How I fix:

Install python-pip via apt-get
Pin the version to 20.3.3
Master has same changes.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Signed-off-by: Zhenggen Xu <zxu@linkedin.com>

RB=2555773
G=lnos-reviewers
R=pchaudha,pmao,samaity,zxu
A=
  • Loading branch information
zhenggen-xu authored and Zhenggen Xu committed Apr 20, 2021
1 parent e856a98 commit bf82ac3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
locales \
mcelog \
ndisc6 \
python-pip \
ipmitool

## Set /etc/shadow permissions to -rw-------.
Expand Down Expand Up @@ -379,7 +380,7 @@ set /files/etc/sysctl.conf/net.netfilter.nf_conntrack_checksum 0
sudo sed -i 's/^#syslog = yes/syslog = yes/' $FILESYSTEM_ROOT/etc/mcelog/mcelog.conf

## docker-py is needed by Ansible docker module
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT easy_install 'pip==20.3.3'
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install --upgrade 'pip==20.3.3'
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install 'docker-py==1.6.0'
## Note: keep pip installed for maintainance purpose

Expand Down

0 comments on commit bf82ac3

Please sign in to comment.