用requirements.txt文件安装依赖时,出现错误,已经安装了PyYAML==5.3.1,无法卸载。
ERROR: Cannot uninstall ‘PyYAML’. 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.
强制安装,仍然无法通过requirements.txt,在网上找到解决办法。
输入以下命令,找出PyYAML的所有相关文件,删除掉
find / -name *PyYAML*
删掉Anaconda里面的。然后正常安装PyYAML即可。