benfred / implicit

Fast Python Collaborative Filtering for Implicit Feedback Datasets
https://benfred.github.io/implicit/
MIT License
3.53k stars 610 forks source link

cannot install implicit on Mac #154

Open chengyu-liu-cs opened 6 years ago

chengyu-liu-cs commented 6 years ago

Mac 10.13.4 Python 2.7.10

using latest version $ python setup.py install WARNING:root:The nvcc binary could not be located in your $PATH. Either add it to your path, or set $CUDAHOME to enable CUDA extensions Failed to find CUDA toolkit. Building without GPU acceleration. running install running bdist_egg running egg_info writing requirements to implicit.egg-info/requires.txt writing implicit.egg-info/PKG-INFO writing top-level names to implicit.egg-info/top_level.txt writing dependency_links to implicit.egg-info/dependency_links.txt reading manifest file 'implicit.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*' found under directory 'examples' writing manifest file 'implicit.egg-info/SOURCES.txt' installing library code to build/bdist.macosx-10.13-intel/egg running install_lib running build_py running build_ext building 'implicit._als' extension g++-8 -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c implicit/_als.cpp -o build/temp.macosx-10.13-intel-2.7/implicit/_als.o -Wno-unused-function -Wno-maybe-uninitialized -O3 -ffast-math -fopenmp -std=c++11 g++-8: warning: x86_64 conflicts with i386 (arch flags ignored) g++-8: error: unrecognized command line option '-Wshorten-64-to-32' error: command 'g++-8' failed with exit status 1 ############################################## $ pip install implicit==0.2.13 Collecting implicit==0.2.13 Using cached https://files.pythonhosted.org/packages/9f/f4/28b1377ed7ea67a4c9496618128f298a702d293f4655b9066a297012bb04/implicit-0.2.13.tar.gz Requirement already satisfied: numpy in /Users/liuuuche/.virtualenv/lib/python2.7/site-packages (from implicit==0.2.13) (1.14.3) Requirement already satisfied: scipy>=0.16 in /Users/liuuuche/.virtualenv/lib/python2.7/site-packages (from implicit==0.2.13) (1.1.0) Building wheels for collected packages: implicit Running setup.py bdist_wheel for implicit ... error Complete output from command /Users/liuuuche/.virtualenv/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/rq/vl09rtbj1wn0jzt_x2knc44s2zfc17/T/pip-install-Flrlj4/implicit/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/rq/vl09rtbj1wn0jzt_x2knc44s2zfc17/T/pip-wheel-nlAmwI --python-tag cp27: running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.13-intel-2.7 creating build/lib.macosx-10.13-intel-2.7/implicit copying implicit/approximate_als.py -> build/lib.macosx-10.13-intel-2.7/implicit copying implicit/init.py -> build/lib.macosx-10.13-intel-2.7/implicit copying implicit/nearest_neighbours.py -> build/lib.macosx-10.13-intel-2.7/implicit copying implicit/als.py -> build/lib.macosx-10.13-intel-2.7/implicit copying implicit/utils.py -> build/lib.macosx-10.13-intel-2.7/implicit copying implicit/recommender_base.py -> build/lib.macosx-10.13-intel-2.7/implicit creating build/lib.macosx-10.13-intel-2.7/implicit/cuda copying implicit/cuda/init.py -> build/lib.macosx-10.13-intel-2.7/implicit/cuda running build_ext building 'implicit._als' extension creating build/temp.macosx-10.13-intel-2.7 creating build/temp.macosx-10.13-intel-2.7/implicit g++-8 -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c implicit/_als.cpp -o build/temp.macosx-10.13-intel-2.7/implicit/_als.o -Wno-unused-function -Wno-maybe-uninitialized -O3 -ffast-math -fopenmp g++-8: warning: x86_64 conflicts with i386 (arch flags ignored) g++-8: error: unrecognized command line option '-Wshorten-64-to-32' error: command 'g++-8' failed with exit status 1


Failed building wheel for implicit Running setup.py clean for implicit Failed to build implicit Installing collected packages: implicit Running setup.py install for implicit ... error Complete output from command /Users/liuuuche/.virtualenv/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/rq/vl09rtbj1wn0jzt_x2knc44s2zfc17/T/pip-install-Flrlj4/implicit/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/rq/vl09rtbj1wn0jzt_x2knc44s2zfc17/T/pip-record-MnzS85/install-record.txt --single-version-externally-managed --compile --install-headers /Users/liuuuche/.virtualenv/include/site/python2.7/implicit: running install running build running build_py creating build creating build/lib.macosx-10.13-intel-2.7 creating build/lib.macosx-10.13-intel-2.7/implicit copying implicit/approximate_als.py -> build/lib.macosx-10.13-intel-2.7/implicit copying implicit/init.py -> build/lib.macosx-10.13-intel-2.7/implicit copying implicit/nearest_neighbours.py -> build/lib.macosx-10.13-intel-2.7/implicit copying implicit/als.py -> build/lib.macosx-10.13-intel-2.7/implicit copying implicit/utils.py -> build/lib.macosx-10.13-intel-2.7/implicit copying implicit/recommender_base.py -> build/lib.macosx-10.13-intel-2.7/implicit creating build/lib.macosx-10.13-intel-2.7/implicit/cuda copying implicit/cuda/init.py -> build/lib.macosx-10.13-intel-2.7/implicit/cuda running build_ext building 'implicit._als' extension creating build/temp.macosx-10.13-intel-2.7 creating build/temp.macosx-10.13-intel-2.7/implicit g++-8 -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c implicit/_als.cpp -o build/temp.macosx-10.13-intel-2.7/implicit/_als.o -Wno-unused-function -Wno-maybe-uninitialized -O3 -ffast-math -fopenmp g++-8: warning: x86_64 conflicts with i386 (arch flags ignored) g++-8: error: unrecognized command line option '-Wshorten-64-to-32' error: command 'g++-8' failed with exit status 1

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

Command "/Users/liuuuche/.virtualenv/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/rq/vl09rtbj1wn0jzt_x2knc44s2zfc17/T/pip-install-Flrlj4/implicit/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/rq/vl09rtbj1wn0jzt_x2knc44s2zfc17/T/pip-record-MnzS85/install-record.txt --single-version-externally-managed --compile --install-headers /Users/liuuuche/.virtualenv/include/site/python2.7/implicit" failed with error code 1 in /private/var/folders/rq/vl09rtbj1wn0jzt_x2knc44s2zfc17/T/pip-install-Flrlj4/implicit/

Tried commands: python setup.py install pip install implicit==0.2.13 and pip install implicit

Tried solutions: Uninstalled gcc and installed with brew install gcc --without-multilib

egork520 commented 6 years ago

I am facing similar issues on MAC.

First was getting same message above, following README installed CUDA and added CUDA path.

But now getting Cython compiler errors.

Collecting implicit==0.2.13
  Using cached https://files.pythonhosted.org/packages/9f/f4/28b1377ed7ea67a4c9496618128f298a702d293f4655b9066a297012bb04/implicit-0.2.13.tar.gz
    Complete output from command python setup.py egg_info:

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                        for j in range(factors):
                            temp = (confidence - 1) * Y[i, j]
                            axpy(&factors, &temp, &Y[i, 0], &one, A + j * factors, &one)

                    err = 0
                    posv("U", &factors, &one, A, &factors, b, &factors, &err)
                       ^
    ------------------------------------------------------------

    implicit/_als.pyx:108:20: no suitable method found

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                        for j in range(factors):
                            temp = (confidence - 1) * Y[i, j]
                            axpy(&factors, &temp, &Y[i, 0], &one, A + j * factors, &one)

                    err = 0
                    posv("U", &factors, &one, A, &factors, b, &factors, &err)
                       ^
    ------------------------------------------------------------

    implicit/_als.pyx:108:20: no suitable method found

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                        memset(x, 0, sizeof(floating) * N)
                        continue

                    # calculate residual r = (YtCuPu - (YtCuY.dot(Xu)
                    temp = -1.0
                    symv("U", &N, &temp, &YtY[0, 0], &N, x, &one, &zero, r, &one)
                       ^
    ------------------------------------------------------------

    implicit/_als.pyx:165:20: no suitable method found

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                    rsold = dot(&N, r, &one, r, &one)

                    for it in range(cg_steps):
                        # calculate Ap = YtCuYp - without actually calculating YtCuY
                        temp = 1.0
                        symv("U", &N, &temp, &YtY[0, 0], &N, p, &one, &zero, Ap, &one)
                           ^
    ------------------------------------------------------------

    implicit/_als.pyx:179:24: no suitable method found

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                        memset(x, 0, sizeof(floating) * N)
                        continue

                    # calculate residual r = (YtCuPu - (YtCuY.dot(Xu)
                    temp = -1.0
                    symv("U", &N, &temp, &YtY[0, 0], &N, x, &one, &zero, r, &one)
                       ^
    ------------------------------------------------------------

    implicit/_als.pyx:165:20: no suitable method found

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                    rsold = dot(&N, r, &one, r, &one)

                    for it in range(cg_steps):
                        # calculate Ap = YtCuYp - without actually calculating YtCuY
                        temp = 1.0
                        symv("U", &N, &temp, &YtY[0, 0], &N, p, &one, &zero, Ap, &one)
                           ^
    ------------------------------------------------------------

    implicit/_als.pyx:179:24: no suitable method found

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
            r = <floating *> malloc(sizeof(floating) * N)
            try:
                for u in prange(users, schedule='guided'):
                    # calculates (A.dot(Xu) - 2 * b).dot(Xu), without calculating A
                    temp = 1.0
                    symv("U", &N, &temp, &YtY[0, 0], &N, &X[u, 0], &one, &zero, r, &one)
                       ^
    ------------------------------------------------------------

    implicit/_als.pyx:238:20: no suitable method found

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
            r = <floating *> malloc(sizeof(floating) * N)
            try:
                for u in prange(users, schedule='guided'):
                    # calculates (A.dot(Xu) - 2 * b).dot(Xu), without calculating A
                    temp = 1.0
                    symv("U", &N, &temp, &YtY[0, 0], &N, &X[u, 0], &one, &zero, r, &one)
                       ^
    ------------------------------------------------------------

    implicit/_als.pyx:238:20: no suitable method found

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                        for j in range(factors):
                            temp = (confidence - 1) * Y[i, j]
                            axpy(&factors, &temp, &Y[i, 0], &one, A + j * factors, &one)

                    err = 0
                    posv("U", &factors, &one, A, &factors, b, &factors, &err)
                       ^
    ------------------------------------------------------------

    implicit/_als.pyx:108:20: Invalid use of fused types, type cannot be specialized

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                        for j in range(factors):
                            temp = (confidence - 1) * Y[i, j]
                            axpy(&factors, &temp, &Y[i, 0], &one, A + j * factors, &one)

                    err = 0
                    posv("U", &factors, &one, A, &factors, b, &factors, &err)
                       ^
    ------------------------------------------------------------

    implicit/_als.pyx:108:20: Invalid use of fused types, type cannot be specialized

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                        memset(x, 0, sizeof(floating) * N)
                        continue

                    # calculate residual r = (YtCuPu - (YtCuY.dot(Xu)
                    temp = -1.0
                    symv("U", &N, &temp, &YtY[0, 0], &N, x, &one, &zero, r, &one)
                       ^
    ------------------------------------------------------------

    implicit/_als.pyx:165:20: Invalid use of fused types, type cannot be specialized

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                    rsold = dot(&N, r, &one, r, &one)

                    for it in range(cg_steps):
                        # calculate Ap = YtCuYp - without actually calculating YtCuY
                        temp = 1.0
                        symv("U", &N, &temp, &YtY[0, 0], &N, p, &one, &zero, Ap, &one)
                           ^
    ------------------------------------------------------------

    implicit/_als.pyx:179:24: Invalid use of fused types, type cannot be specialized

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                        memset(x, 0, sizeof(floating) * N)
                        continue

                    # calculate residual r = (YtCuPu - (YtCuY.dot(Xu)
                    temp = -1.0
                    symv("U", &N, &temp, &YtY[0, 0], &N, x, &one, &zero, r, &one)
                       ^
    ------------------------------------------------------------

    implicit/_als.pyx:165:20: Invalid use of fused types, type cannot be specialized

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                    rsold = dot(&N, r, &one, r, &one)

                    for it in range(cg_steps):
                        # calculate Ap = YtCuYp - without actually calculating YtCuY
                        temp = 1.0
                        symv("U", &N, &temp, &YtY[0, 0], &N, p, &one, &zero, Ap, &one)
                           ^
    ------------------------------------------------------------

    implicit/_als.pyx:179:24: Invalid use of fused types, type cannot be specialized

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
            r = <floating *> malloc(sizeof(floating) * N)
            try:
                for u in prange(users, schedule='guided'):
                    # calculates (A.dot(Xu) - 2 * b).dot(Xu), without calculating A
                    temp = 1.0
                    symv("U", &N, &temp, &YtY[0, 0], &N, &X[u, 0], &one, &zero, r, &one)
                       ^
    ------------------------------------------------------------

    implicit/_als.pyx:238:20: Invalid use of fused types, type cannot be specialized

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
            r = <floating *> malloc(sizeof(floating) * N)
            try:
                for u in prange(users, schedule='guided'):
                    # calculates (A.dot(Xu) - 2 * b).dot(Xu), without calculating A
                    temp = 1.0
                    symv("U", &N, &temp, &YtY[0, 0], &N, &X[u, 0], &one, &zero, r, &one)
                       ^
    ------------------------------------------------------------

    implicit/_als.pyx:238:20: Invalid use of fused types, type cannot be specialized

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                        for j in range(factors):
                            temp = (confidence - 1) * Y[i, j]
                            axpy(&factors, &temp, &Y[i, 0], &one, A + j * factors, &one)

                    err = 0
                    posv("U", &factors, &one, A, &factors, b, &factors, &err)
                        ^
    ------------------------------------------------------------

    implicit/_als.pyx:108:21: Operation not allowed without gil

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                        for j in range(factors):
                            temp = (confidence - 1) * Y[i, j]
                            axpy(&factors, &temp, &Y[i, 0], &one, A + j * factors, &one)

                    err = 0
                    posv("U", &factors, &one, A, &factors, b, &factors, &err)
                        ^
    ------------------------------------------------------------

    implicit/_als.pyx:108:21: Operation not allowed without gil

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                        memset(x, 0, sizeof(floating) * N)
                        continue

                    # calculate residual r = (YtCuPu - (YtCuY.dot(Xu)
                    temp = -1.0
                    symv("U", &N, &temp, &YtY[0, 0], &N, x, &one, &zero, r, &one)
                        ^
    ------------------------------------------------------------

    implicit/_als.pyx:165:21: Operation not allowed without gil

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                    rsold = dot(&N, r, &one, r, &one)

                    for it in range(cg_steps):
                        # calculate Ap = YtCuYp - without actually calculating YtCuY
                        temp = 1.0
                        symv("U", &N, &temp, &YtY[0, 0], &N, p, &one, &zero, Ap, &one)
                            ^
    ------------------------------------------------------------

    implicit/_als.pyx:179:25: Operation not allowed without gil

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                        memset(x, 0, sizeof(floating) * N)
                        continue

                    # calculate residual r = (YtCuPu - (YtCuY.dot(Xu)
                    temp = -1.0
                    symv("U", &N, &temp, &YtY[0, 0], &N, x, &one, &zero, r, &one)
                        ^
    ------------------------------------------------------------

    implicit/_als.pyx:165:21: Operation not allowed without gil

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
                    rsold = dot(&N, r, &one, r, &one)

                    for it in range(cg_steps):
                        # calculate Ap = YtCuYp - without actually calculating YtCuY
                        temp = 1.0
                        symv("U", &N, &temp, &YtY[0, 0], &N, p, &one, &zero, Ap, &one)
                            ^
    ------------------------------------------------------------

    implicit/_als.pyx:179:25: Operation not allowed without gil

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
            r = <floating *> malloc(sizeof(floating) * N)
            try:
                for u in prange(users, schedule='guided'):
                    # calculates (A.dot(Xu) - 2 * b).dot(Xu), without calculating A
                    temp = 1.0
                    symv("U", &N, &temp, &YtY[0, 0], &N, &X[u, 0], &one, &zero, r, &one)
                        ^
    ------------------------------------------------------------

    implicit/_als.pyx:238:21: Operation not allowed without gil

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
            r = <floating *> malloc(sizeof(floating) * N)
            try:
                for u in prange(users, schedule='guided'):
                    # calculates (A.dot(Xu) - 2 * b).dot(Xu), without calculating A
                    temp = 1.0
                    symv("U", &N, &temp, &YtY[0, 0], &N, &X[u, 0], &one, &zero, r, &one)
                        ^
    ------------------------------------------------------------

    implicit/_als.pyx:238:21: Operation not allowed without gil
    Compiling implicit/_als.pyx because it depends on /usr/local/lib/python2.7/site-packages/Cython/Includes/libc/string.pxd.
    Compiling implicit/_nearest_neighbours.pyx because it depends on /usr/local/lib/python2.7/site-packages/Cython/Includes/libcpp/vector.pxd.
    [1/2] Cythonizing implicit/_als.pyx
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/2d/gpnnpt311530mg1b2bl3spqr0000gn/T/pip-install-v4EMuu/implicit/setup.py", line 141, in <module>
        ext_modules=define_extensions(use_cython),
      File "/private/var/folders/2d/gpnnpt311530mg1b2bl3spqr0000gn/T/pip-install-v4EMuu/implicit/setup.py", line 67, in define_extensions
        return cythonize(modules)
      File "/usr/local/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 877, in cythonize
        cythonize_one(*args)
      File "/usr/local/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 997, in cythonize_one
        raise CompileError(None, pyx_file)
    Cython.Compiler.Errors.CompileError: implicit/_als.pyx

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/2d/gpnnpt311530mg1b2bl3spqr0000gn/T/pip-install-v4EMuu/implicit/
Shershebnev commented 6 years ago

Doing this brew uninstall gcc brew install gcc --HEAD (this took around an hour on macbook pro 2017) mv /usr/local/bin/g++-HEAD /usr/local/bin/g++-9 has helped me, tested on python2.7, 3.4, 3.6 and 3.7. Make sure you have numpy, scipy and cython installed before installing implicit.

egork520 commented 6 years ago

@Shershebnev that didn't help. Similar issue.

benfred commented 6 years ago

@chengyu-liu-cs if you uninstall GCC and try installing it should fall back to using clang and work. This means you won't have a multithreaded version, but at least should work. Alternatively you could try the advice of @Shershebnev (which I'm trying out right now! thanks for that), or upgrade your python version to not use the python shipping with OSX (download anaconda or similar).

@comorado I think that you have a different issue than what was originally reported. What version of cython are you using?

farscape2012 commented 6 years ago

@benfred Both solutions did not work for me. I simply deployed a docker and installed the library in a Ubuntu system.

THX for trying to help

benfred commented 6 years ago

Hmm - I just tried out the suggestion from @Shershebnev, and it didn't work for me on the system python on OSX =(. The best bet for the system python is to compile with clang by uninstalling gcc. I might add some options to explicitly set the compiler to use soon.

You can also use a different python distribution like anaconda, which should work with GCC.

There are also prebuilt binaries available on conda forge: conda install -c conda-forge implicit which mean that if you use anaconda you won't even need to compile (though the conda packages don't have openmp support on OSX, so will just be single threaded).

Shershebnev commented 6 years ago

@benfred that’s strange :( Which OSX version are you on? I’ve tried on High Sierra. Might as well try on Sierra later

egork520 commented 6 years ago

@benfred Cython version 0.23.1 Thank you!

Sytten commented 6 years ago

Personally I had no trouble installing it, but I get a segfault when using the AlternatingLeastSquares.similar_items. Training went smoothly though...

EDIT: I traced the bug back to numpy dot product. I think its a bug on their part or ours.

egork520 commented 6 years ago

Was able to use workaround by using docker containers in which I used slim-jessie linux and install implicit.

`# Use an official Python runtime as a parent image ARG PYTHON_VERSION=2.7 ARG LINUX_DISTRO=slim-jessie

FROM python:${PYTHON_VERSION}-${LINUX_DISTRO}

WORKDIR /opt/implicit

RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ ca-certificates \ curl \ vim \ git \ libopenblas-dev \ gfortran \ libhdf5-dev RUN python -m pip install \ implicit `

ludwigm commented 4 years ago

The problem still exists with the most recent version implicit 0.4.2. Multiple attempts with reinstalling gcc, using llvm it still does not really work. The documentation on how to make it work on Mac OS X are also far too little. With normal pip install it fails with:

clang: error: unsupported option '-fopenmp'
error: command 'clang++' failed with exit status 1

I am on Mac OS Catalina 10.15.2 and Python 3.8. But same results wit Python 3.7

divayjindal95 commented 4 years ago

I was facing the same problem, I followed these steps: `

  1. brew update && brew upgrade
  2. conda install -c intel mkl -y
  3. brew install libomp
  4. conda install -c conda-forge/label/cf202003 implicit `