seqlearn icon indicating copy to clipboard operation
seqlearn copied to clipboard

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

Open Freakwill opened this issue 5 years ago • 1 comments

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.

Freakwill avatar Apr 04 '20 11:04 Freakwill

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

danni avatar Jun 03 '20 02:06 danni