运行 python 脚本(使用 python3)时,我一直看到错误No module named 'ruamel'
,即使在运行命令pip3 install ruamel.yaml
The issue was that the versions of pip and python were mismatched, so pip was installing the ruamel module onto python 3.8, but running python3 was using python 3.9
To diagnose the issue:
python3 --version
pip3 --version
If the versions are different, you can call pip with the exact version number. For example, pip3.9 install ruamel.yaml
to ensure that the module is installed onto the correct python version.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.