Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"pip3 install pipenv" gives error: ERROR: Cannot uninstall 'distlib'

Tags:

pip

alpine

pipenv

How can I resolve the following error?

When trying to install pipenv on Alpine:

pip3 install pipenv

I get the following error:

Installing collected packages: distlib, virtualenv, pipenv
  Attempting uninstall: distlib
    Found existing installation: distlib 0.3.0
ERROR: Cannot uninstall 'distlib'. 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.

Python version: 3.8.3
pip3 version: 20.2.2
Alpine version: 3.12 (Linux 5.4.43-1-virt #2-Alpine SMP Thu, 28 May 2020 20:13:48 UTC x86_64 Linux)

like image 211
Rob Bednark Avatar asked Aug 21 '20 01:08

Rob Bednark


1 Answers

Install using the --ignore-installed distlib option to pip3:

pip3 install --ignore-installed distlib pipenv
#            ^^^^^^^^^^^^^^^^^^^^^^^^^^
like image 78
Rob Bednark Avatar answered Sep 29 '22 19:09

Rob Bednark