2

I'm running these commands building a docker from code in a dockerfile, but I think this would be a problem with regular pip install too.

The line

RUN git clone https://github.com/<my-github-name/quail.git && cd quail/ && git fetch origin && git branch --track <local-branch-name> origin/<remote-branch-name> && git checkout <new-local-branch-name> && pip install -e .

throws the error

Cannot uninstall 'ply'. 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.

I'm aware of this error with pip>8.0 and why pip adopted this behavior, but I'm not sure how I can get around it. In dockerfiles, I usually do so with pip's --ignore-installed flag, but ply is a dependency of a dependency of the quail package I'm installing.

I also need to make this docker portable to others who may and may not already have ply installed locally.

Thanks

edit: ended up using the ugly solution of downgrading pip RUN pip install pip==8.0.1 for the install and immediately re-upgrading to 10.0.1 afterward. Definitely still open to cleaner fixes!

paxton4416
  • 495
  • 3
  • 7
  • Obviously `ply` is installed by the system's package manager, so you should see if you can upgrade it via system tools, e.g. `apt install --only-upgrade python-ply`. Maybe you can even uninstall it if no other package depends on it. – hoefling Jun 26 '18 at 11:41
  • Possible duplicate of [pip cannot uninstall : "It is a distutils installed project"](https://stackoverflow.com/questions/53807511/pip-cannot-uninstall-package-it-is-a-distutils-installed-project) – ivan_pozdeev Dec 17 '18 at 11:22

0 Answers0