正确安装,且可以在命令行下正确导入,然后在执行程序的时候又报错:AttributeError: module 'yaml' has no attribute 'FullLoader'然后我就查看了一下我安装的yaml的版本:
pip show yaml # 显示是3.12版本,版本太老
複製代碼
2、错误探索1
网上查看教程,说是要更新yaml的版本到5.2,更新的方式如下:
pip install -U PyYAML
複製代碼
更新的过程中又报错:
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.