Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libyaml is not found or a compiler error #170

Closed
natea opened this issue May 4, 2014 · 2 comments
Closed

libyaml is not found or a compiler error #170

natea opened this issue May 4, 2014 · 2 comments
Labels
question User questions

Comments

@natea
Copy link

natea commented May 4, 2014

When I tried to install cookiecutter, I got the following error:

  Running setup.py install for PyYAML
    checking if libyaml is compilable
    clang -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c build/temp.macosx-10.9-x86_64-2.7/check_libyaml.c -o build/temp.macosx-10.9-x86_64-2.7/check_libyaml.o
    build/temp.macosx-10.9-x86_64-2.7/check_libyaml.c:2:10: fatal error: 'yaml.h' file not found
    #include <yaml.h>
             ^
    1 error generated.

    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 cookiecutter binaryornot jinja2 PyYAML
Cleaning up...

I don't know if libyaml is required in order for cookiecutter to work properly, but if so, then the output is misleading since the "Successfully installed PyYAML" message implies that it was installed correctly.

I was able to avoid this error by installing libyaml using Homebrew:

$ brew install libyaml
@bollwyvl
Copy link
Contributor

I think PyYAML will fall back to a pure-python parser if libyaml is not available, so even when it said it failed, everything is cool.

On a related note: if someone has to use yaml for part of the functionality (in this case, for .cookiecutterrc) it seems like they should get to use it wherever.

Here's my hack of cookiecutter that does just that:
https://github.com/bollwyvl/cookiecutter

@michaeljoseph
Copy link
Contributor

This question seems answered to me- closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question User questions
Projects
None yet
Development

No branches or pull requests

3 participants