balouf / gismo

GISMO is a NLP tool to rank and organize a corpus of documents according to a query.
Other
5 stars 2 forks source link

Installation failed on Mac OS big sur #37

Open hadifar opened 3 years ago

hadifar commented 3 years ago

Description

Installation failed on Mac OS

It throws following exception:

    ERROR: Command errored out with exit status 1:
     command: /Users/mac/openstax/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/37/1v5vb2z97g70zb_1r426lwn00000gn/T/pip-install-fsavv10r/llvmlite_4e61c01357474baab7263c5404786523/setup.py'"'"'; __file__='"'"'/private/var/folders/37/1v5vb2z97g70zb_1r426lwn00000gn/T/pip-install-fsavv10r/llvmlite_4e61c01357474baab7263c5404786523/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/37/1v5vb2z97g70zb_1r426lwn00000gn/T/pip-record-udqlk3k5/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mac/openstax/include/site/python3.9/llvmlite
         cwd: /private/var/folders/37/1v5vb2z97g70zb_1r426lwn00000gn/T/pip-install-fsavv10r/llvmlite_4e61c01357474baab7263c5404786523/
    Complete output (29 lines):
    running install
    running build
    got version from file /private/var/folders/37/1v5vb2z97g70zb_1r426lwn00000gn/T/pip-install-fsavv10r/llvmlite_4e61c01357474baab7263c5404786523/llvmlite/_version.py {'version': '0.34.0', 'full': 'c5889c9e98c6b19d5d85ebdd982d64a03931f8e2'}
    running build_ext
    /Users/mac/openstax/bin/python /private/var/folders/37/1v5vb2z97g70zb_1r426lwn00000gn/T/pip-install-fsavv10r/llvmlite_4e61c01357474baab7263c5404786523/ffi/build.py
    LLVM version... Traceback (most recent call last):
      File "/private/var/folders/37/1v5vb2z97g70zb_1r426lwn00000gn/T/pip-install-fsavv10r/llvmlite_4e61c01357474baab7263c5404786523/ffi/build.py", line 105, in main_posix
        out = subprocess.check_output([llvm_config, '--version'])
      File "/usr/local/Cellar/python@3.9/3.9.2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 424, in check_output
        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "/usr/local/Cellar/python@3.9/3.9.2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 505, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/usr/local/Cellar/python@3.9/3.9.2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/usr/local/Cellar/python@3.9/3.9.2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1823, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/private/var/folders/37/1v5vb2z97g70zb_1r426lwn00000gn/T/pip-install-fsavv10r/llvmlite_4e61c01357474baab7263c5404786523/ffi/build.py", line 191, in <module>
        main()
      File "/private/var/folders/37/1v5vb2z97g70zb_1r426lwn00000gn/T/pip-install-fsavv10r/llvmlite_4e61c01357474baab7263c5404786523/ffi/build.py", line 185, in main
        main_posix('osx', '.dylib')
      File "/private/var/folders/37/1v5vb2z97g70zb_1r426lwn00000gn/T/pip-install-fsavv10r/llvmlite_4e61c01357474baab7263c5404786523/ffi/build.py", line 107, in main_posix
        raise RuntimeError("%s failed executing, please point LLVM_CONFIG "
    RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
    error: command '/Users/mac/openstax/bin/python' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/mac/openstax/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/37/1v5vb2z97g70zb_1r426lwn00000gn/T/pip-install-fsavv10r/llvmlite_4e61c01357474baab7263c5404786523/setup.py'"'"'; __file__='"'"'/private/var/folders/37/1v5vb2z97g70zb_1r426lwn00000gn/T/pip-install-fsavv10r/llvmlite_4e61c01357474baab7263c5404786523/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/37/1v5vb2z97g70zb_1r426lwn00000gn/T/pip-record-udqlk3k5/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mac/openstax/include/site/python3.9/llvmlite Check the logs for full command output.
balouf commented 3 years ago

Thanks for the report! Currently Gismo only supports Python 3.6 to Python 3.8. The issue does not comes from Gismo itself, but from the Numba dependency, cf for instance https://github.com/numba/numba/issues/6345 https://github.com/numba/llvmlite/issues/669

When Numba is 100% supported with 3.9, I will add the support, but I have no control on the timeline, but it should be a matter of weeks.

If you have an urgent need for Gismo, one option is to use a venv to set up a 3.8 environment.

Thanks again!