报错:pkg_resources.VersionConflict

在用MultiQC软件中,遇到Python的报错,具体如下:

报错内容:

pkg_resources.VersionConflict: (PyYAML 3.11 (/home/GGG/software/python/python3.9/lib/python3.9/site-packages), Requirement.parse('pyyaml>=4'))

##原因是pyyaml的版本太低,需要更新

操作:

pip3 install --upgrade --target=/home/GGGG/software/python/python3.9/lib/python3.9/site-packages pyyaml     # --upgrade  更新,如果没有这个参数,系统识别到低版本后就不会安装新版本了。

之后,又有类似的报错:

pkg_resources.ContextualVersionConflict: (python-dateutil 2.5.1 (/home/GGGG/software/python/python3.9/lib/python3.9/site-packages), Requirement.parse('python-dateutil>=2.7'), {'matplotlib'})

同样是版本问题

操作:

pip3 install --upgrade --target=/home/GGGG/software/python/python3.9/lib/python3.9/site-packages python-dateutil

之后就可以正常运行了!

你可能感兴趣的:(报错:pkg_resources.VersionConflict)