Skip to content Skip to sidebar Skip to footer

Why Fatal Error: 'yaml.h' File Not Found When Installing Pyyaml?

I'm trying out downloading PyYAML and install it following the instructions here http://pyyaml.org/wiki/PyYAML So I downloaded the ZIP package: http://pyyaml.org/download/pyyaml/Py

Solution 1:

You can solve the issue by reinstalling the pyyaml package after adding required dependent libraries. Following are the steps:

  1. Uninstall pyyaml

pip uninstall pyyaml

  1. Install below packages

apt-get install libyaml-dev libpython2.7-dev

  1. Install pyyaml again

pip install pyyaml

Solution 2:

In MacOS the following solved the problem:

pip3 uninstall PyYaml
pip3 install PyYaml==5.2

Post a Comment for "Why Fatal Error: 'yaml.h' File Not Found When Installing Pyyaml?"