Docker compose 尝试使用pip install Red Hat安装软件包时出错

Docker compose 尝试使用pip install Red Hat安装软件包时出错,docker-compose,pip,redhat,Docker Compose,Pip,Redhat,早上好,我正在尝试使用pip安装安装软件包,在本例中,docker compose表示我想在Red Hat 8中安装它,我已经安装了docker,但我有以下错误: [dockermd@srvdevrma1 ~]$ sudo pip3 install docker-compose WARNING: Running pip install with root privileges is generally not a good idea. Try pip3 install --user instea

早上好,我正在尝试使用pip安装安装软件包,在本例中,docker compose表示我想在Red Hat 8中安装它,我已经安装了docker,但我有以下错误:

[dockermd@srvdevrma1 ~]$ sudo pip3 install docker-compose
WARNING: Running pip install with root privileges is generally not a good idea. Try pip3 install --user instead.
Collecting docker-compose
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f324ba08e10>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/docker-compose/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f324ba08a20>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/docker-compose/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f324ba08cc0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/docker-compose/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f324ba084a8>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/docker-compose/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f324ba08630>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/docker-compose/
Could not find a version that satisfies the requirement docker-compose (from versions: )
No matching distribution found for docker-compose

这会发生在您尝试使用pip安装的任何软件包中,您需要为您的
sudo
用户声明代理。最简单的解决办法是

sudo -i
export http_proxy=https://E10697:xxxxxx++@10.162.64.36:8080
export https_proxy=https://E10697:xxxxxx++@10.162.64.36:8080
pip3 install docker-compose
exit
sudo -i
export http_proxy=https://E10697:xxxxxx++@10.162.64.36:8080
export https_proxy=https://E10697:xxxxxx++@10.162.64.36:8080
pip3 install docker-compose
exit