When we are running pytorch scripts, we may get this error: ModuleNotFoundError: No module named ‘yaml’. In this tutorial, we will introduce you how to fix it.
Install yaml model
We can use pip to install this model, for example:
pip install -i https://mirrors.aliyun.com/pypi/simple/ pyyaml --trusted-host mirrors.aliyun.com
We should notice: we should install pyyaml, not yaml. Otherwise, you will get an error.
Run this command, we will find this error is fixed.