Closed arianpasquali closed 1 year ago
I met the same problem on MacOS Catalina 10.15.1 Collecting pyemd Downloading https://files.pythonhosted.org/packages/c0/c5/7fea8e7a71cd026b30ed3c40e4c5ea13a173e28f8855da17e25271e8f545/pyemd-0.5.1.tar.gz (91kB) |████████████████████████████████| 92kB 7.4kB/s Requirement already satisfied: numpy<2.0.0,>=1.9.0 in /Users/chenlinwei/anaconda3/envs/DL3.7/lib/python3.7/site-packages (from pyemd) (1.18.0) Building wheels for collected packages: pyemd Building wheel for pyemd (setup.py) ... error ERROR: Command errored out with exit status 1: command: /Users/chenlinwei/anaconda3/envs/DL3.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/zb/v9k82d0554g7r1nv3vg44zj40000gn/T/pip-install-aqeow6hv/pyemd/setup.py'"'"'; file='"'"'/private/var/folders/zb/v9k82d0554g7r1nv3vg44zj40000gn/T/pip-install-aqeow6hv/pyemd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/zb/v9k82d0554g7r1nv3vg44zj40000gn/T/pip-wheel-kearan --python-tag cp37 cwd: /private/var/folders/zb/v9k82d0554g7r1nv3vg44zj40000gn/T/pip-install-aqeow6hv/pyemd/ Complete output (19 lines): running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.7-x86_64-3.7 creating build/lib.macosx-10.7-x86_64-3.7/pyemd copying pyemd/init__.py -> build/lib.macosx-10.7-x86_64-3.7/pyemd copying pyemd/about.py -> build/lib.macosx-10.7-x86_64-3.7/pyemd running build_ext building 'pyemd.emd' extension creating build/temp.macosx-10.7-x86_64-3.7 creating build/temp.macosx-10.7-x86_64-3.7/pyemd gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/chenlinwei/anaconda3/envs/DL3.7/include -arch x86_64 -I/Users/chenlinwei/anaconda3/envs/DL3.7/include -arch x86_64 -Ipyemd -I/Users/chenlinwei/anaconda3/envs/DL3.7/include/python3.7m -I/Users/chenlinwei/anaconda3/envs/DL3.7/lib/python3.7/site-packages/numpy/core/include -c pyemd/emd.cpp -o build/temp.macosx-10.7-x86_64-3.7/pyemd/emd.o warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] pyemd/emd.cpp:644:10: fatal error: 'ios' file not found
^~~~~
ERROR: Failed building wheel for pyemd Running setup.py clean for pyemd Failed to build pyemd Installing collected packages: pyemd Running setup.py install for pyemd ... error ERROR: Command errored out with exit status 1: command: /Users/chenlinwei/anaconda3/envs/DL3.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/zb/v9k82d0554g7r1nv3vg44zj40000gn/T/pip-install-aqeow6hv/pyemd/setup.py'"'"'; file='"'"'/private/var/folders/zb/v9k82d0554g7r1nv3vg44zj40000gn/T/pip-install-aqeow6hv/pyemd/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/zb/v9k82d0554g7r1nv3vg44zj40000gn/T/pip-record-otpm2wj7/install-record.txt --single-version-externally-managed --compile cwd: /private/var/folders/zb/v9k82d0554g7r1nv3vg44zj40000gn/T/pip-install-aqeow6hv/pyemd/ Complete output (19 lines): running install running build running build_py creating build creating build/lib.macosx-10.7-x86_64-3.7 creating build/lib.macosx-10.7-x86_64-3.7/pyemd copying pyemd/init.py -> build/lib.macosx-10.7-x86_64-3.7/pyemd copying pyemd/about.py -> build/lib.macosx-10.7-x86_64-3.7/pyemd running build_ext building 'pyemd.emd' extension creating build/temp.macosx-10.7-x86_64-3.7 creating build/temp.macosx-10.7-x86_64-3.7/pyemd gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/chenlinwei/anaconda3/envs/DL3.7/include -arch x86_64 -I/Users/chenlinwei/anaconda3/envs/DL3.7/include -arch x86_64 -Ipyemd -I/Users/chenlinwei/anaconda3/envs/DL3.7/include/python3.7m -I/Users/chenlinwei/anaconda3/envs/DL3.7/lib/python3.7/site-packages/numpy/core/include -c pyemd/emd.cpp -o build/temp.macosx-10.7-x86_64-3.7/pyemd/emd.o warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] pyemd/emd.cpp:644:10: fatal error: 'ios' file not found
^~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/chenlinwei/anaconda3/envs/DL3.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/zb/v9k82d0554g7r1nv3vg44zj40000gn/T/pip-install-aqeow6hv/pyemd/setup.py'"'"'; file='"'"'/private/var/folders/zb/v9k82d0554g7r1nv3vg44zj40000gn/T/pip-install-aqeow6hv/pyemd/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/zb/v9k82d0554g7r1nv3vg44zj40000gn/T/pip-record-otpm2wj7/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
Facing the same issue; any solutions?
Same here
having the same problem here, is this a common issue?
Just faced this issue as well, using:
macOS Mojave 10.14.6 Python 3.7.3 (default, Mar 27 2019, 16:54:48) [Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
**just my experience, will delete if this causes a confusion
hey guys, i solved this problem by solving the problem associated with the 'gcc' issue which is:
error: command 'gcc' failed with exit status 1
in the error code.
it seems that the latest version of macOS replaced stdlibc++ with libc++ (honestly, i'm not familiar with the terminology but..) so all we need to do is
but rather than
this is the original blog post i've used. (KOREAN), but would be easier to google in your own languages https://lsjsj92.tistory.com/561
I had the same problem on OSX Mojave. found just doing export MACOSX_DEPLOYMENT_TARGET=10.10 didn't work for me. However, I found that that running xcode-select --install worked for me, and afterwards I could install with pip3 install pyemd. I am on OSX Mojave. See https://github.com/wmayner/pyemd/issues/39
I will have some time to look into the various installation issues in a few weeks. In the meantime I'm happy to review PRs.
same issue here
Same issue here, using:
Debian GNU/Linux 9.12 (stretch) Python 3.7.3
The solution by @umamiguy does not work for me. The problem seems to be -- as for many other libraries -- the python glue code for C++ expects to find headers in /usr/include
, but this directory is not available because of Apple's SIP (no idea what that is). This causes problems with include <cmath>
that ... I don't understand C++ well enough to grok.
This yields error messages like:
In file included from pyemd/emd.cpp:566:
In file included from pyemd/lib/emd_hat.hpp:95:
In file included from pyemd/lib/emd_hat_impl.hpp:13:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:318:9: error: no member named 'fpclassify' in the global namespace
using ::fpclassify;
~~^
As suggested here
This can be fixed by deleting /Library/Developer/CommandLineTools and running sudo xcode-select -s /Applications/Xcode.app
Not very elegant but I hope it helps.
Had the same issue. For the system:
macOS: 10.15.7-x86_64 CLT: 12.0.31.1 Xcode: 12.4
after doing the following, I could install pyemd into a Python 3.8 virtual environment:
#include <math.h>
. In my case this is line 304.#include </Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h>
Don't ask me why. See also here.
pyemd fails to install on python 3.7 environment on Mac OS X Catalina (version 10.15 beta). similar to issue [#39] (https://github.com/wmayner/pyemd/issues/39)
I am using virtualenv with python 3.7.1.