eFEL
eFEL copied to clipboard
installation on virtual env does not work
I am trying to install eFEL as a prerequisite for sonata-network-reduction with:
pip install git+git://github.com/BlueBrain/eFEL
however, the installation is terminated with
... gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/MustafaKeremKurban/anaconda3/include -arch x86_64 -I/Users/MustafaKeremKurban/anaconda3/include -arch x86_64 -Iefel/cppcore/ -I/Users/MustafaKeremKurban/anaconda3/include/python3.7m -c efel/cppcore/cppcore.cpp -o build/temp.macosx-10.7-x86_64-3.7/efel/cppcore/cppcore.o warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] efel/cppcore/cppcore.cpp:39:10: fatal error: 'cstddef' file not found #include
^~~~~~~~~ 1 warning and 1 error generated. error: command 'gcc' failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /Users/MustafaKeremKurban/Desktop/BBP_internship/sonata-network-reduction/tests/data/CA1.O1/sonata/mypython/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/yh/cnjh7mlx0ylc6ns89scsqjmw0000gp/T/pip-req-build-3y53ds4w/setup.py'"'"'; file='"'"'/private/var/folders/yh/cnjh7mlx0ylc6ns89scsqjmw0000gp/T/pip-req-build-3y53ds4w/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/yh/cnjh7mlx0ylc6ns89scsqjmw0000gp/T/pip-record-tcc0tcir/install-record.txt --single-version-externally-managed --compile --install-headers /Users/MustafaKeremKurban/Desktop/BBP_internship/sonata-network-reduction/tests/data/CA1.O1/sonata/mypython/include/site/python3.7/efel Check the logs for full command output.
Is this an access issue or is there a prerequisite for eFEL as well?
fatal error: 'cstddef' file not found
gcc
isn't finding the C++
standard library, of which cstddef
is a part:
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++'
It looks like you're using anaconda on the Mac? I'll leave the decision up to @wvangeit whether that's a supported platform.
To work around the problem, it might work to change:
cppcore = Extension('efel.cppcore',
sources=cppcore_sources,
include_dirs=['efel/cppcore/'])
to:
cppcore = Extension('efel.cppcore',
sources=cppcore_sources,
include_dirs=['efel/cppcore/'],
extra_compile_args=['-stdlib=libc++', ],
)
But that's a guess.
Where is this place that I should change? Still not working for me
In the setup.py. but this is really a workaround.
@KeremKurban , can you mention how you installed this (e.g. was it on a Mac) ?
I tried pip install efel
and downloaded the zip file and tried to install with setup.py on a MacBook Pro.
ok, and which python are using on your Mac ? (the version, and the way it was installed) (did you do something specific to get your gcc compiler)
python 3.7.3 with anaconda but python path is set to neuron and I cannot change it. (PYTHONPATH=/Applications/NEURON-7.7/nrn/lib/python:) I haven't tried done anything to gcc compiler yet.
I just want to add that after installing efel successfully on one anaconda environment, I'm trying to install it in a new conda environment and getting this same error. So for some reason, the first installation had no problem finding the C++ standard library, but in a fresh conda environment (python 3.6.8), it can't (gives same error as above).
I'm on macOS Mojave 10.14.6.
The current version of efel is building and testing the project (as well as the pull requests made on it) on the combination of the following operating systems and python versions.
matrix:
os: [ubuntu-22.04, macos-12, windows-latest]
python: [cp39, cp310, cp311, cp312]
arch: [x86_64, amd64]
Source: https://github.com/BlueBrain/eFEL/blob/d793808bdd50650e192e376455c56d47582354bd/.github/workflows/build-wheels.yml#L13
This issue is not present anymore with the latest version. If it happens again, please inform us.