错误提示:pkg_resources.VersionConflict: (PyYAML 5.4.1 (c:\users\addoi\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages), Requirement.parse('pyyaml<7.0,>=6.0'))
yaml的英文名称是Yet Another Markup Language,直译过来就是标记语言。yaml用的比较多的地方就是写配置文件,比如yaml配置文件在Kubernetes用的就非常广泛,学Kubernetes必须要先学yaml文件格式。
pyyaml是python的第三方库,是Python的YAML解析器和生成器
解决:
调用pip3 install --upgrade --target=c:\users\addoi\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packagess pyyaml
报错ERROR: Can not combine '--user' and '--target'
修改为pip3 install --upgrade --target=c:\users\addoi\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packagess --no-user pyyaml
但还是安装的Successfully installed pyyaml-6.0
最后修改为
pip3 install --upgrade --target=c:\users\addoi\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packagess --no-user python-dateutil
报错:ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
gitlint-core 0.17.0 requires Click>=8, but you have click 7.1.2 which is incompatible.
pyocd 0.34.2.dev15 requires pyyaml<7.0,>=6.0, but you have pyyaml 5.4.1 which is incompatible.
参照(3条消息) 2021-04-28_不满足软件包要求pyyaml_Edison Yin的博客-CSDN博客 将版本改为6.0也不行
参考 pip3 install -r nrf/scripts/requirements.txt 得到错误 Windows 10 - 北欧问答 - 北欧开发区 - 北欧开发区 (nordicsemi.com) 可以试着将pyocd降低版本
最后重装pyocd解决的