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

Installation error: command 'clang' failed with exit status 1 #46

Open
Freakwill opened this issue Apr 4, 2020 · 1 comment
Open

Installation error: command 'clang' failed with exit status 1 #46

Freakwill opened this issue Apr 4, 2020 · 1 comment

Comments

@Freakwill
Copy link

the last part of error message is

seqlearn/_decode/bestfirst.c:600:10: fatal error: 'numpy/arrayobject.h' file not found
#include "numpy/arrayobject.h"
         ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------

ERROR: Command errored out with exit status 1: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4f/zswmtvpn44gfvcz53m_c24400000gn/T/pip-install-6hdkoh2q/seqlearn/setup.py'"'"'; file='"'"'/private/var/folders/4f/zswmtvpn44gfvcz53m_c24400000gn/T/pip-install-6hdkoh2q/seqlearn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/4f/zswmtvpn44gfvcz53m_c24400000gn/T/pip-record-gr6jqkyt/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7m/seqlearn Check the logs for full command output.

@danni
Copy link

danni commented Jun 3, 2020

It looks like retrieving the numpy dir is not working when installing from PyPi (and other places?)

Run this in your terminal and you should be able to install.

export CFLAGS="-I$(python -c 'import numpy; print(numpy.get_include())')"

In general, if you want to improve the ease of installation of this module, setup.py should be extended to include Cython. You can also build a custom extension to include numpy when building e.g. https://stackoverflow.com/a/42163080/4391298

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

No branches or pull requests

2 participants