An error message appears when importing the yaml package

ERROR: Could not find a version that satisfies the requirement yaml (from versions: none) ERROR: No
Insert image description here

I found various information on the Internet before. cmd installs yaml. Most of the information on the Internet is pip install yaml.

Insert image description here
But executing pip install pyyaml ​​will succeed.

D:\pytestLearn>pip install pyyaml
Collecting pyyaml
  Downloading PyYAML-6.0-cp38-cp38-win_amd64.whl (155 kB)
     |████████████████████████████████| 155 kB 9.7 kB/s
Installing collected packages: pyyaml
Successfully installed pyyaml-6.0
WARNING: You are using pip version 20.2.3; however, version 22.3.1 is available.
You should consider upgrading via the 'c:\users\14860\appdata\local\programs\python\python38\python.exe -m pip install --upgrade pip' command.

D:\pytestLearn>

Later I learned that python3.X can only be installed using pip install pyyaml.

To see if the installation is successful, enter import pyyaml.

Guess you like

Origin blog.csdn.net/budaoweng0609/article/details/128408104