- If you already have a version of GCC > 7.2, you can skip this step. Otherwise you have to install it:
brew install gcc
; - make sure the symbolic links are created, i.e.
/usr/local/bin/gcc -> gcc-7
,/usr/local/bin/g++ -> g++-7
- I used the version 7 of GCC, but probably a newer version will work too.
- tell PIP to compile the package, avoiding the pre-compiled binaries:
pip install --force-reinstall --ignore-installed --no-binary :all: pyrfr
It seems that a lot of users (like me) have issues on installing the Random Forest Run package from AutoML on a Mac.
Notably, often peolple are faced with:
ImportError: No module named '_regression'
This happens because the PyRFR binaries which comes with PIP are compiled with the version 7.2 of GCC, and then there is some symbol that the sytem is unable to understand. Notably:
undefined symbol: _ZTVNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEEE
The built-in GCC compiler for the macOS (at least, for High Sierra) is the 4.x That's why we need to install a newer GCC version.
Now that we have the compiler installed, we have to tell PIP to use this compiler to create the binaries, that's what the --no-binaries
flag of PIP stands for.
That's all!