lee-group-cmu / RFCDE

Random Forests for Conditional Density Estimation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

install error

inti opened this issue · comments

Hi,
Thanks for providing this code.
I have found the following error while trying to install

Any suggestions to overcome this?


Collecting rfcde
  Downloading https://files.pythonhosted.org/packages/68/e0/82067fa37b8d918ac759e9f66bbde58b9f492dfbd7cc11995b94aebd52ba/rfcde-0.2.tar.gz (63kB)
    100% |████████████████████████████████| 71kB 2.2MB/s
Requirement already satisfied: numpy in ./anaconda2/envs/ge_net/lib/python2.7/site-packages (from rfcde) (1.15.1)
Requirement already satisfied: cython in ./anaconda2/envs/ge_net/lib/python2.7/site-packages (from rfcde) (0.28.5)
Requirement already satisfied: statsmodels in ./anaconda2/envs/ge_net/lib/python2.7/site-packages (from rfcde) (0.9.0)
Building wheels for collected packages: rfcde
  Running setup.py bdist_wheel for rfcde ... error
  Complete output from command /Users/inti.pedroso/anaconda2/envs/ge_net/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/yt/p39gwb910ys3dl075j1qwbnw0000gn/T/pip-install-maFFcw/rfcde/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/yt/p39gwb910ys3dl075j1qwbnw0000gn/T/pip-wheel-gROJgf --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.6-x86_64-2.7
  creating build/lib.macosx-10.6-x86_64-2.7/rfcde
  copying src/rfcde/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/rfcde
  copying src/rfcde/basis_functions.py -> build/lib.macosx-10.6-x86_64-2.7/rfcde
  copying src/rfcde/core.py -> build/lib.macosx-10.6-x86_64-2.7/rfcde
  copying src/rfcde/kde.py -> build/lib.macosx-10.6-x86_64-2.7/rfcde
  running egg_info
  writing requirements to src/rfcde.egg-info/requires.txt
  writing src/rfcde.egg-info/PKG-INFO
  writing top-level names to src/rfcde.egg-info/top_level.txt
  writing dependency_links to src/rfcde.egg-info/dependency_links.txt
  reading manifest file 'src/rfcde.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'src/rfcde.egg-info/SOURCES.txt'
  copying src/rfcde/Forest.cpp -> build/lib.macosx-10.6-x86_64-2.7/rfcde
  copying src/rfcde/Forest.h -> build/lib.macosx-10.6-x86_64-2.7/rfcde
  copying src/rfcde/ForestWrapper.cpp -> build/lib.macosx-10.6-x86_64-2.7/rfcde
  copying src/rfcde/ForestWrapper.pyx -> build/lib.macosx-10.6-x86_64-2.7/rfcde
  copying src/rfcde/Node.cpp -> build/lib.macosx-10.6-x86_64-2.7/rfcde
  copying src/rfcde/Node.h -> build/lib.macosx-10.6-x86_64-2.7/rfcde
  copying src/rfcde/Split.cpp -> build/lib.macosx-10.6-x86_64-2.7/rfcde
  copying src/rfcde/Split.h -> build/lib.macosx-10.6-x86_64-2.7/rfcde
  copying src/rfcde/Tree.cpp -> build/lib.macosx-10.6-x86_64-2.7/rfcde
  copying src/rfcde/Tree.h -> build/lib.macosx-10.6-x86_64-2.7/rfcde
  copying src/rfcde/helpers.cpp -> build/lib.macosx-10.6-x86_64-2.7/rfcde
  copying src/rfcde/helpers.h -> build/lib.macosx-10.6-x86_64-2.7/rfcde
  running build_ext
  building 'rfcde.ForestWrapper' extension
  creating build/temp.macosx-10.6-x86_64-2.7
  creating build/temp.macosx-10.6-x86_64-2.7/src
  creating build/temp.macosx-10.6-x86_64-2.7/src/rfcde
  gcc -fno-strict-aliasing -I/Users/inti.pedroso/anaconda2/envs/ge_net/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Isrc/rfcde -I/Users/inti.pedroso/anaconda2/envs/ge_net/lib/python2.7/site-packages/numpy/core/include -Isrc/rfcde/ -I/Users/inti.pedroso/anaconda2/envs/ge_net/include/python2.7 -c src/rfcde/ForestWrapper.cpp -o build/temp.macosx-10.6-x86_64-2.7/src/rfcde/ForestWrapper.o -std=c++11
  In file included from src/rfcde/ForestWrapper.cpp:612:
  In file included from /Users/inti.pedroso/anaconda2/envs/ge_net/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
  In file included from /Users/inti.pedroso/anaconda2/envs/ge_net/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18:
  In file included from /Users/inti.pedroso/anaconda2/envs/ge_net/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1777:
  /Users/inti.pedroso/anaconda2/envs/ge_net/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
  #warning "Using deprecated NumPy API, disable it by " \
   ^
  1 warning generated.
  gcc -fno-strict-aliasing -I/Users/inti.pedroso/anaconda2/envs/ge_net/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Isrc/rfcde -I/Users/inti.pedroso/anaconda2/envs/ge_net/lib/python2.7/site-packages/numpy/core/include -Isrc/rfcde/ -I/Users/inti.pedroso/anaconda2/envs/ge_net/include/python2.7 -c src/rfcde/Forest.cpp -o build/temp.macosx-10.6-x86_64-2.7/src/rfcde/Forest.o -std=c++11
  src/rfcde/Forest.cpp:4:10: fatal error: 'random' file not found
  #include <random>
           ^~~~~~~~
  1 error generated.
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for rfcde
  Running setup.py clean for rfcde
Failed to build rfcde
Installing collected packages: rfcde
  Running setup.py install for rfcde ... error
    Complete output from command /Users/inti.pedroso/anaconda2/envs/ge_net/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/yt/p39gwb910ys3dl075j1qwbnw0000gn/T/pip-install-maFFcw/rfcde/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/yt/p39gwb910ys3dl075j1qwbnw0000gn/T/pip-record-ELj7Wi/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.6-x86_64-2.7
    creating build/lib.macosx-10.6-x86_64-2.7/rfcde
    copying src/rfcde/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/rfcde
    copying src/rfcde/basis_functions.py -> build/lib.macosx-10.6-x86_64-2.7/rfcde
    copying src/rfcde/core.py -> build/lib.macosx-10.6-x86_64-2.7/rfcde
    copying src/rfcde/kde.py -> build/lib.macosx-10.6-x86_64-2.7/rfcde
    running egg_info
    writing requirements to src/rfcde.egg-info/requires.txt
    writing src/rfcde.egg-info/PKG-INFO
    writing top-level names to src/rfcde.egg-info/top_level.txt
    writing dependency_links to src/rfcde.egg-info/dependency_links.txt
    reading manifest file 'src/rfcde.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'src/rfcde.egg-info/SOURCES.txt'
    copying src/rfcde/Forest.cpp -> build/lib.macosx-10.6-x86_64-2.7/rfcde
    copying src/rfcde/Forest.h -> build/lib.macosx-10.6-x86_64-2.7/rfcde
    copying src/rfcde/ForestWrapper.cpp -> build/lib.macosx-10.6-x86_64-2.7/rfcde
    copying src/rfcde/ForestWrapper.pyx -> build/lib.macosx-10.6-x86_64-2.7/rfcde
    copying src/rfcde/Node.cpp -> build/lib.macosx-10.6-x86_64-2.7/rfcde
    copying src/rfcde/Node.h -> build/lib.macosx-10.6-x86_64-2.7/rfcde
    copying src/rfcde/Split.cpp -> build/lib.macosx-10.6-x86_64-2.7/rfcde
    copying src/rfcde/Split.h -> build/lib.macosx-10.6-x86_64-2.7/rfcde
    copying src/rfcde/Tree.cpp -> build/lib.macosx-10.6-x86_64-2.7/rfcde
    copying src/rfcde/Tree.h -> build/lib.macosx-10.6-x86_64-2.7/rfcde
    copying src/rfcde/helpers.cpp -> build/lib.macosx-10.6-x86_64-2.7/rfcde
    copying src/rfcde/helpers.h -> build/lib.macosx-10.6-x86_64-2.7/rfcde
    running build_ext
    building 'rfcde.ForestWrapper' extension
    creating build/temp.macosx-10.6-x86_64-2.7
    creating build/temp.macosx-10.6-x86_64-2.7/src
    creating build/temp.macosx-10.6-x86_64-2.7/src/rfcde
    gcc -fno-strict-aliasing -I/Users/inti.pedroso/anaconda2/envs/ge_net/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Isrc/rfcde -I/Users/inti.pedroso/anaconda2/envs/ge_net/lib/python2.7/site-packages/numpy/core/include -Isrc/rfcde/ -I/Users/inti.pedroso/anaconda2/envs/ge_net/include/python2.7 -c src/rfcde/ForestWrapper.cpp -o build/temp.macosx-10.6-x86_64-2.7/src/rfcde/ForestWrapper.o -std=c++11
    In file included from src/rfcde/ForestWrapper.cpp:612:
    In file included from /Users/inti.pedroso/anaconda2/envs/ge_net/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
    In file included from /Users/inti.pedroso/anaconda2/envs/ge_net/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18:
    In file included from /Users/inti.pedroso/anaconda2/envs/ge_net/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1777:
    /Users/inti.pedroso/anaconda2/envs/ge_net/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
    #warning "Using deprecated NumPy API, disable it by " \
     ^
    1 warning generated.
    gcc -fno-strict-aliasing -I/Users/inti.pedroso/anaconda2/envs/ge_net/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Isrc/rfcde -I/Users/inti.pedroso/anaconda2/envs/ge_net/lib/python2.7/site-packages/numpy/core/include -Isrc/rfcde/ -I/Users/inti.pedroso/anaconda2/envs/ge_net/include/python2.7 -c src/rfcde/Forest.cpp -o build/temp.macosx-10.6-x86_64-2.7/src/rfcde/Forest.o -std=c++11
    src/rfcde/Forest.cpp:4:10: fatal error: 'random' file not found
    #include <random>
             ^~~~~~~~
    1 error generated.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/Users/inti.pedroso/anaconda2/envs/ge_net/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/yt/p39gwb910ys3dl075j1qwbnw0000gn/T/pip-install-maFFcw/rfcde/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/yt/p39gwb910ys3dl075j1qwbnw0000gn/T/pip-record-ELj7Wi/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/yt/p39gwb910ys3dl075j1qwbnw0000gn/T/pip-install-maFFcw/rfcde/```

I don't have MacOS to test, but it's not finding the random header from the c++ standard libraries. Seems similar to wesm/feather#61. Perhaps try their export MACOSX_DEPLOYMENT_TARGET=10.10 workaround