Install pyyaml using pip/Add PyYaml as pip dependency
pip, python, yaml
Solution
You will need some extra packages to build it.
First of all you need to uninstall `pyyaml`, or it will complain later that it is already installed
pip uninstall pyyaml
Then install the following packages:
sudo apt-get install libyaml-dev libpython2.7-dev
Finally install it again
pip install pyyaml
Problem
I want to use PyYaml in my pip project, but am having trouble using it as a dependency. Mainly the problem is thet PyYaml in pip is not a cross platform install. How do I install pyyaml using pip so that it works. Note, on a current fresh Ubuntu install I get the following error when running `pip install pyyaml` ``` Installing collected packages: pyyaml Running setup.py install for pyyaml checking if libyaml is compilable gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC -I/usr/include/python3.2mu -c build/temp.linux-x86_64-3.2/check_libyaml.c -o build/temp.linux-x86_64-3.2/check_libyaml.o build/temp.linux-x86_64-3.2/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory compilation terminated. libyaml is not found or a compiler error: forcing --without-libyaml (if libyaml is installed correctly, you may need to specify the option --include-dirs or uncomment and modify the parameter include_dirs in setup.cfg) Successfully installed pyyaml ``` Note that the error says "successfully installed" but it is not. I can not `import yaml` I am not looking for answers that say "use apt-get" due to my very first sentence. I need the install to be cross platform and work as a pip dependency I am not simply wondering on how to install it correctly. If this is not possible, is there any library I can use in replacement?