centos7 installation docker-compose error solution

  docker-compose choreography is a stand-alone service docker container, docker-compose more container is a management tool that can solve such dependencies between the container, when more start in the host vessel time, if done manually operation will feel cumbersome and container error, this time recommended dockerd stand-alone scheduling tool docker-compose.

centos7 mounting docker-compose:

First need to install the package python-pip

[root@harbor-node1 ~]# yum install epel-release
[root@harbor-node1 ~]# yum install -y python-pip
[root@harbor-node1 ~]# pip install --upgrade pip

Installation docker-compose using pip

[root@harbor-node1 ~]# pip install docker-compose

As reported the following error occurs:

Cause: The system is missing python environment Package
Solution:

[root@harbor-node1 ~]#yum -y install python-devel python-subprocess32 

Execution pip install docker-compose continue given as follows:

Cause: pip mounted reliance python3 docker-compose the environment, while carrying centos7 default Python version 2.7.5, after the first execution pip install docker-compose fails, the installation package python-subprocess32, Python system Environmentally the information recorded file is not updated, the need to remove, let the system automatically re-generate.

Solution:

[root@harbor-node1 ~]#find / -name *subpro*.egg-info
/usr/lib64/python2.7/site-packages/subprocess32-3.2.6-py2.7.egg-info
[root@harbor-node1 ~]#find / -name *subpro*.egg-info |xargs rm -rf

Perform the installation again, # pip install docker-compose, finally succeeded

Verify docker-compose version:

Other solutions:
when installing pip tools directly choose to install pip3 version,

[root@harbor-node1 ~]#yum install python3-pip

That problem does not occur with the above installation docker-compose pip3

[root@harbor-node1 ~]#pip3 install docker-compose

The above problem does not occur on Ubuntu18.04 system because Ubuntu18.04 default comes with Python 3.6.8 environment.

Guess you like

Origin www.cnblogs.com/eddie1127/p/12003358.html