【pip install】ERROR: Cannot uninstall ‘xx’. It is a distutils installed project 的解决办法
此文章为本菜鸡学习问题记录,如有错误还请大佬指正
问题
今天在安装audtorch使用pip install audtorch进行安装时,报错:
ERROR: Cannot uninstall ‘packaging’. 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.
解决
【万能语法】如果以后遇到ERROR: Cannot uninstall [pacakage]. It is a distutils installed project…类似错误,就可以先使用pip install --ignore-installed [package],再安装
以此例子,输入:
pip install --ignore-installed packaging
安装完成后,重新安装想要安装的audtorch
输入:
pip install audtorch
即可安装成功!