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 limits.h #49

Open
janvanrijn opened this issue Nov 27, 2018 · 7 comments
Open

Installation error limits.h #49

janvanrijn opened this issue Nov 27, 2018 · 7 comments

Comments

@janvanrijn
Copy link

Installed swig, cmake, gcc in conda, however we get the following error:



(gensim_env) dyn-160-39-178-198:~ prernakashyap$ pip install pyrfr

Collecting pyrfr

  Using cached https://files.pythonhosted.org/packages/ed/0f/4d7e42a9dfef3a1898e03cffa8f1cfcd1f96507d718808b2db584c6f8401/pyrfr-0.8.0.tar.gz

Building wheels for collected packages: pyrfr

  Running setup.py bdist_wheel for pyrfr ... error

  Complete output from command /Users/prernakashyap/anaconda3/envs/gensim_env/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/ty/2lwym9l571l4xvwp44x5c43c0000gn/T/pip-install-9wu83pgt/pyrfr/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/ty/2lwym9l571l4xvwp44x5c43c0000gn/T/pip-wheel-ee82_ljr --python-tag cp36:

  running bdist_wheel

  running build

  running build_ext

  building 'pyrfr._regression' extension

  swigging pyrfr/regression.i to pyrfr/regression_wrap.cpp

  swig -python -c++ -modern -features nondynamic -I./include -o pyrfr/regression_wrap.cpp pyrfr/regression.i

  creating build

  creating build/temp.macosx-10.7-x86_64-3.6

  creating build/temp.macosx-10.7-x86_64-3.6/pyrfr

  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/prernakashyap/anaconda3/envs/gensim_env/include -arch x86_64 -I/Users/prernakashyap/anaconda3/envs/gensim_env/include -arch x86_64 -I./include -I/Users/prernakashyap/anaconda3/envs/gensim_env/include/python3.6m -c pyrfr/regression_wrap.cpp -o build/temp.macosx-10.7-x86_64-3.6/pyrfr/regression_wrap.o -O2 -std=c++11

  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]

  In file included from /Users/prernakashyap/anaconda3/envs/gensim_env/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/syslimits.h:7:0,

                   from /Users/prernakashyap/anaconda3/envs/gensim_env/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:34,

                   from /Users/prernakashyap/anaconda3/envs/gensim_env/include/python3.6m/Python.h:11,

                   from pyrfr/regression_wrap.cpp:173:

  /Users/prernakashyap/anaconda3/envs/gensim_env/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory

   #include_next <limits.h>  /* recurse down to the real one */

                                                               ^

  compilation terminated.

  error: command 'gcc' failed with exit status 1

  

  ----------------------------------------

  Failed building wheel for pyrfr

  Running setup.py clean for pyrfr

Failed to build pyrfr

Installing collected packages: pyrfr

  Running setup.py install for pyrfr ... error

    Complete output from command /Users/prernakashyap/anaconda3/envs/gensim_env/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/ty/2lwym9l571l4xvwp44x5c43c0000gn/T/pip-install-9wu83pgt/pyrfr/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/ty/2lwym9l571l4xvwp44x5c43c0000gn/T/pip-record-9qiyacqw/install-record.txt --single-version-externally-managed --compile:

    running install

    running build_ext

    building 'pyrfr._regression' extension

    swigging pyrfr/regression.i to pyrfr/regression_wrap.cpp

    swig -python -c++ -modern -features nondynamic -I./include -o pyrfr/regression_wrap.cpp pyrfr/regression.i

    creating build

    creating build/temp.macosx-10.7-x86_64-3.6

    creating build/temp.macosx-10.7-x86_64-3.6/pyrfr

    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/prernakashyap/anaconda3/envs/gensim_env/include -arch x86_64 -I/Users/prernakashyap/anaconda3/envs/gensim_env/include -arch x86_64 -I./include -I/Users/prernakashyap/anaconda3/envs/gensim_env/include/python3.6m -c pyrfr/regression_wrap.cpp -o build/temp.macosx-10.7-x86_64-3.6/pyrfr/regression_wrap.o -O2 -std=c++11

    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]

    In file included from /Users/prernakashyap/anaconda3/envs/gensim_env/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/syslimits.h:7:0,

                     from /Users/prernakashyap/anaconda3/envs/gensim_env/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:34,

                     from /Users/prernakashyap/anaconda3/envs/gensim_env/include/python3.6m/Python.h:11,

                     from pyrfr/regression_wrap.cpp:173:

    /Users/prernakashyap/anaconda3/envs/gensim_env/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory

     #include_next <limits.h>  /* recurse down to the real one */

                                                                 ^

    compilation terminated.

    error: command 'gcc' failed with exit status 1

    

    ----------------------------------------

Command "/Users/prernakashyap/anaconda3/envs/gensim_env/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/ty/2lwym9l571l4xvwp44x5c43c0000gn/T/pip-install-9wu83pgt/pyrfr/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/ty/2lwym9l571l4xvwp44x5c43c0000gn/T/pip-record-9qiyacqw/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/ty/2lwym9l571l4xvwp44x5c43c0000gn/T/pip-install-9wu83pgt/pyrfr/

Did someone encounter this problem before? Conda version is 4.5.X

@janvanrijn
Copy link
Author

cc @prerna135

@AndreBiedenkapp
Copy link
Collaborator

As I suggested in automl/fanova#74 it might be due to the wrong gcc version.
Could you tell me which gcc version you are using?

@prerna135
Copy link

I managed to install pyrfr on a mac by setting export CFLAGS="-Wno-deprecated-declarations -std=c++11 -stdlib=libc++" and running pip install pyrfr. I also installed ConfigSpace before doing this. @janvanrijn

@janvanrijn
Copy link
Author

cc @abhinavs95

@janvanrijn
Copy link
Author

I also had problems installing on my Mac, but the comment by @prerna135 solved the problem also for me. This should be in the user manual (I am happy to provide a PR)

@abhinavs95
Copy link

Worked for me too, used solution by @prerna135

@lamuertepeluda
Copy link

env CFLAGS="-Wno-deprecated-declarations -std=c++11 -stdlib=libc++" pipenv install auto-sklearn (or pip if you like) worked for me on macOS X Catalina...
I agree this should be in the documentation. Thank you @prerna135 , I was misleaded by other comments telling to install gcc 9 from homebrew, but the clang will be just fine (and -stdlib=libc++ is not recognized by gcc, anyway, leading to other errors).

It installed and compiled without throwing errors. Now I hope it also works. I tried:

pipenv shell # activate virtualenv
ipython # launch ipython
In [1]: import autosklearn.classification
/Users/vito/.local/share/virtualenvs/python-Z0GfkDos/lib/python3.7/site-packages/pyparsing.py:3172: FutureWarning: Possible set intersection at position 3
  self.re = re.compile(self.reString)
/Users/vito/.local/share/virtualenvs/python-Z0GfkDos/lib/python3.7/site-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release.
  from numpy.core.umath_tests import inner1d

and I hope everything's fine 😅 'cause I can't understand what it means

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

5 participants