Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose pip install fails with pip 10.0.0 #5883

Closed
soundsgoodsofar opened this issue Apr 17, 2018 · 9 comments
Closed

docker-compose pip install fails with pip 10.0.0 #5883

soundsgoodsofar opened this issue Apr 17, 2018 · 9 comments

Comments

@soundsgoodsofar
Copy link

Description of the issue

We're running docker-compose on CentOS. The pip version when installed with --upgrade changed to 10.0.0 in the last couple days and our docker install (pip install docker-compose) began failing with the following message. It appears that pip 10.0.0 has increased the version dependency of package requests to 2.6.0, which is incompatible with the default docker-compose installation.

Context information (for bug reports)

Output of "docker-compose version"
N/A
Output of "docker version"
Client:
 Version:	18.03.0-ce
 API version:	1.37
 Go version:	go1.9.4
 Git commit:	0520e24
 Built:	Wed Mar 21 23:09:15 2018
 OS/Arch:	linux/amd64
 Experimental:	false
 Orchestrator:	swarm

Server:
 Engine:
  Version:	18.03.0-ce
  API version:	1.37 (minimum version 1.12)
  Go version:	go1.9.4
  Git commit:	0520e24
  Built:	Wed Mar 21 23:13:03 2018
  OS/Arch:	linux/amd64
  Experimental:	false
Output of "docker-compose config"
N/A

Steps to reproduce the issue

  1. Install CentOS 7
  2. yum install -y epel-release
  3. yum install -y python-pip
  4. pip install --upgrade pip
  5. pip install docker-compose

Observed result

Install fails

Expected result

Install succeeds

Stacktrace / full error message

$ pip install docker-compose
...
  Found existing installation: requests 2.6.0
Cannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

Additional information

OS version / distribution, docker-compose install method, etc.

@ningthoujam-lokhendro
Copy link

I have the same issue. Workaround for now would be not to upgrade the pip to 10.x.

@yuriwoof
Copy link

yuriwoof commented Apr 19, 2018

I also have same and downgrade pip to 9.0.3.

@jamiejackson
Copy link

Also an issue on RHEL 7.4. Temporarily working around the problem by doing the same as @hermesian, using:

sudo pip install --upgrade --force-reinstall pip==9.0.3

@shin-
Copy link

shin- commented Apr 24, 2018

After looking at this more closely, it looks like this is mostly a pip / Linux distribution issue:

My takeaway here is that it's not Compose's responsibility to fix, nor would we be able to even if we wanted to.

Downgrading pip is probably a reasonable course of action for the short term (other reasonable options: virtualenv, Compose binaries). In the long term, the way yum installs some Python packages probably needs to change.

opnfv-github pushed a commit to opnfv/releng-testresults that referenced this issue Apr 28, 2018
New upgrade of pip 10 is causing the problem.
Links - 1. docker/compose#5883
        2. https://bugs.launchpad.net/devstack/+bug/1763966
        3. pypa/pip#4805

Change-Id: I8d49dda2ae55569833075fff792d9ded0030f56b
@shin- shin- closed this as completed May 24, 2018
@KittenLeo
Copy link

KittenLeo commented Mar 1, 2019

The same question
Found existing installation: requests 2.6.0
Cannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

@Sabya1981
Copy link

And the issue still persists....

@ghost
Copy link

ghost commented Feb 15, 2022

I have solved this issue using python3.
At first I checked if python3 is installed
image
Then I find all the available python paths:
image
And finally, I used update-alternatives to make python3 default
image

@naomatheus
Copy link

@ghost
This solution worked for me as well on EC2.

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1

Followed by:

python --version 
>> 3.9.xx

pip install docker-compose

Success.

@pkilpo
Copy link

pkilpo commented Apr 21, 2023

Did not work for me even python3.

[ec2-user@ip-10-232-145-56 ~]$ python --version
Python 3.9.16
[ec2-user@ip-10-232-145-56 ~]$

 sudo pip3 install docker-compose
...

 Found existing installation: requests 2.25.1
ERROR: Cannot uninstall requests 2.25.1, RECORD file not found. Hint: The package was installed by rpm.

But it works without "sudo"
pip install docker-compose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants