question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No such file or directory: 'llvm-config'

See original GitHub issue

Hello,

I am trying to install llvmlite on MacOS Catalina for Python 3.8. I firstly used the pyCharm IDE it did not worked. I installed llvm and run pip3 install llvmlite

I am receiving an error message which says:

ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-exq7k9p7/llvmlite/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-exq7k9p7/llvmlite/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/tmp/pip-record-9mvmoqq7/install-record.txt --single-version-externally-managed --compile
         cwd: /private/tmp/pip-install-exq7k9p7/llvmlite/
    Complete output (29 lines):
    running install
    running build
    got version from file /private/tmp/pip-install-exq7k9p7/llvmlite/llvmlite/_version.py {'version': '0.30.0', 'full': '3cad106e2f727bc400f1b426ce306b1e30e34b72'}
    running build_ext
    /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 /private/tmp/pip-install-exq7k9p7/llvmlite/ffi/build.py
    LLVM version... Traceback (most recent call last):
      File "/private/tmp/pip-install-exq7k9p7/llvmlite/ffi/build.py", line 105, in main_posix
        out = subprocess.check_output([llvm_config, '--version'])
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 411, in check_output
        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 489, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 854, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 1702, 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/tmp/pip-install-exq7k9p7/llvmlite/ffi/build.py", line 168, in <module>
        main()
      File "/private/tmp/pip-install-exq7k9p7/llvmlite/ffi/build.py", line 162, in main
        main_posix('osx', '.dylib')
      File "/private/tmp/pip-install-exq7k9p7/llvmlite/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 '/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-exq7k9p7/llvmlite/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-exq7k9p7/llvmlite/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/tmp/pip-record-9mvmoqq7/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

The config file exists and it is in this location: /usr/local/Cellar/llvm/9.0.0_1/include/llvm/config

I don’t know what am I doing wrong. I tried to reinstall llvm and link it. brew reinstall llvm brev link llvm

in that case, I receive another error:

`Warning: Refusing to link macOS-provided software: llvm
If you need to have llvm first in your PATH run:
  echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.bash_profile

For compilers to find llvm you may need to set:
  export LDFLAGS="-L/usr/local/opt/llvm/lib"
  export CPPFLAGS="-I/usr/local/opt/llvm/include"`

I also tried to use this: $ sudo LLVM_CONFIG=/usr/local/Cellar/llvm/9.0.0_1/include/llvm/config/llvm-config.h pip3 install llvmlite

New error is:

ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/36/wbzh7n_97jg1zk1ylzzfwqz80000gn/T/pip-install-rhijucgy/llvmlite/setup.py'"'"'; __file__='"'"'/private/var/folders/36/wbzh7n_97jg1zk1ylzzfwqz80000gn/T/pip-install-rhijucgy/llvmlite/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/36/wbzh7n_97jg1zk1ylzzfwqz80000gn/T/pip-record-pcj1wmd6/install-record.txt --single-version-externally-managed --compile
         cwd: /private/var/folders/36/wbzh7n_97jg1zk1ylzzfwqz80000gn/T/pip-install-rhijucgy/llvmlite/
    Complete output (18 lines):
    running install
    running build
    got version from file /private/var/folders/36/wbzh7n_97jg1zk1ylzzfwqz80000gn/T/pip-install-rhijucgy/llvmlite/llvmlite/_version.py {'version': '0.30.0', 'full': '3cad106e2f727bc400f1b426ce306b1e30e34b72'}
    running build_ext
    /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 /private/var/folders/36/wbzh7n_97jg1zk1ylzzfwqz80000gn/T/pip-install-rhijucgy/llvmlite/ffi/build.py
    LLVM version... 9.0.0
    
    Traceback (most recent call last):
      File "/private/var/folders/36/wbzh7n_97jg1zk1ylzzfwqz80000gn/T/pip-install-rhijucgy/llvmlite/ffi/build.py", line 168, in <module>
        main()
      File "/private/var/folders/36/wbzh7n_97jg1zk1ylzzfwqz80000gn/T/pip-install-rhijucgy/llvmlite/ffi/build.py", line 162, in main
        main_posix('osx', '.dylib')
      File "/private/var/folders/36/wbzh7n_97jg1zk1ylzzfwqz80000gn/T/pip-install-rhijucgy/llvmlite/ffi/build.py", line 120, in main_posix
        raise RuntimeError(msg)
    RuntimeError: Building llvmlite requires LLVM 7.0+ Be sure to set LLVM_CONFIG to the right executable path.
    Read the documentation at http://llvmlite.pydata.org/ for more information about building llvmlite.
    
    error: command '/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/36/wbzh7n_97jg1zk1ylzzfwqz80000gn/T/pip-install-rhijucgy/llvmlite/setup.py'"'"'; __file__='"'"'/private/var/folders/36/wbzh7n_97jg1zk1ylzzfwqz80000gn/T/pip-install-rhijucgy/llvmlite/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/36/wbzh7n_97jg1zk1ylzzfwqz80000gn/T/pip-record-pcj1wmd6/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

Can you please help me to understand what is the problem here?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:23 (10 by maintainers)

github_iconTop GitHub Comments

61reactions
gianderiucommented, May 4, 2020

If the error appeared after April the 17th (see history) try installing it with

pip3 install llvmlite==0.31.0
6reactions
seibertcommented, Nov 22, 2019

If your goal is to use Numba, you will have to wait until our late-December release. Python 3.8 changed bytecode generation significantly enough to break the Numba frontend, and we are working on fixing it. The first patches have been merged to Numba’s master branch, but there are still pending Python 3.8 fixes.

If you use Python 3.7, you won’t have any build issues as we have posted binary wheels and conda packages for all platforms.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error installing llvmlite 0.34.0: FileNotFoundError: [Errno 2] No ...
Error installing llvmlite 0.34.0: FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config': 'llvm-config' #621.
Read more >
[Errno 2] No such file or directory: 'llvm-config'` - llvmlite
Q: What can I do about llvm-config not being found? A: This depends on your original intent: I am a user and I...
Read more >
Dockerfile fails with llvm-config error for numba install
My Dockerfile using a pypy base fails with FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config' when installing llvmlite, ...
Read more >
Error installing llvmlite 0.34.0: FileNotFoundError: [Errno 2] No ...
Error installing llvmlite 0.34.0: FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config': 'llvm-config'. run following in your environment.
Read more >
Installation — llvmlite 0.40.0dev0-48-ged0f625-dirty ...
Numba is the compiler package, this depends on llvmlite. ... FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config' ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found