12

Trying to install llvmlite via pip by running

pip install llvmlite

constantly gives me this error:

    RuntimeError: <path> failed executing, please point LLVM_CONFIG to the path for llvm-config
    error: command '/Users/sfalk/miniconda3/envs/asr-service/bin/python' failed with exit status 1
    ----------------------------------------

Now, I am on Python 3.5

$ python --version
Python 3.5.6 :: Anaconda, Inc.

And just running pip install llvmlite will give me this:

 RuntimeError: Building llvmlite requires LLVM 7.0.x, 7.1.x or 8.0.x, got '10.0.0'. Be sure to set LLVM_CONFIG to the right executable path.

I installed LLVM 8 via brew

brew install llvm@8

Setting LLVM_CONFIG to either does not work.

  • /usr/local/opt/llvm@8/bin (were I assumed llvm-config to be), or
  • /usr/local/opt/llvm@8/Toolchains/LLVM8.0.1.xctoolchain/usr/bin (where I actually found llvm-config to be)

And I keep getting some version of:

RuntimeError: /usr/local/opt/llvm@8/Toolchains/LLVM8.0.1.xctoolchain/usr/bin failed executing, please point LLVM_CONFIG to the path for llvm-config

What am I missing here?

Stefan Falk
  • 23,898
  • 50
  • 191
  • 378

6 Answers6

10

And for those reviewing the post in search for a solution to installing numba, the version released on June 24, 2020 works: pip install numba==0.50.1

  • 1
    Can you please elaborate on why installing `numba` answers the question? – jnovack Sep 27 '20 at 23:03
  • Sorry, I am a newbie in contributing to stack overflow, so this might be a stretch. I was trying to install numba which depends on llvmlite, and the last stable release (of numba) uses the llvmlite version with the bug detailed in the question. My train of thought was that my comment might be helpful to those looking to solve the numba installation problem. In hindsight, I think it might have been more helpful to open a new question for numba specifically and answer that one. – Vlad-Marius Griguta Sep 28 '20 at 08:50
  • 1
    I still get the error even when using `pip install numba==0.50.1` – sh37211 Jun 09 '22 at 16:27
9

Looks like there is an issue with latest version of llvmlite. Please consider using 0.31.0 version.

>>pip install llvmlite==0.31.0

Collecting llvmlite==0.31.0
  Downloading 
https://files.pythonhosted.org/packages/10/31/aa315fbc2e0b7777b95ce166b7c988f53e4cdd4c33d06eea24f395539eb4/llvmlite-0.31.0-cp35-cp35m-macosx_10_9_x86_64.whl (15.9MB)
    100% |████████████████████████████████| 15.9MB 1.1MB/s 

Installing collected packages: llvmlite

Successfully installed llvmlite-0.31.0
jnovack
  • 7,629
  • 2
  • 26
  • 40
Karthik Gali
  • 121
  • 1
  • 4
7

You will have to install the required llvm package using and link the executable config

sudo apt install llvm-**X**

and then

sudo pip3 install llvmlite 
cd /usr/bin
sudo ln -s llvm-config-**X** llvm-config

This fixed the llvm issue of installing librosa on my raspberry pi (aarch64)

Pipper Tetsing
  • 403
  • 4
  • 5
  • What "X" did you use for your installation? Also, could you list the versions of numpy, numba, llvmlite, and librosa on your pi that ultimately were installed? – Austin Oct 05 '20 at 17:37
  • It is the version number you have installed. e.g. **X** should be replaced with 10.0.0 if you have that version installed. I am sorry, I do not still have the environment I initially used. But I recall using numpy 1.16, librosa 0.7.X and lvmlite 7. Make sure your numba version is supported for the lvmlite – Pipper Tetsing Oct 07 '20 at 13:08
  • I was able to get it to work with LLVM-7, numpy 1.16.1, numba 0.49.0, llvmlite 0.32.0, and librosa 0.8.0! I think you can get newer LLVM versions to work, but you need to scale numba and llvmlite to match compatibility. Raspbian has an easily installable LLVM-7, so I went with the versions I mention above. – Austin Oct 07 '20 at 18:52
  • In my case, for Ubuntu 18.04/Mint 19.3, I used `apt install llvm-10`, and then set the new `llvm-config` link. Then it worked! https://askubuntu.com/questions/1286131/how-do-i-install-llvm-10-on-ubuntu-18-04/1286132 – CoderGuy123 Oct 23 '20 at 02:48
1

I was facing the same issue.

You will have to install the required llvm package using and link the executable config

sudo apt install llvm-X

and then

sudo pip3 install llvmlite cd /usr/bin sudo ln -s llvm-config-X llvm-config

did not work for me but I did notice we had the same output error

RuntimeError: <path> failed executing, please point LLVM_CONFIG to the path for llvm-config

So I thought: "why not point the LLVM_CONFIG to the proper llvm-config?".

And I did this simple fix:

export LLVM_CONFIG=/usr/bin/llvm-config-10
vvvvv
  • 25,404
  • 19
  • 49
  • 81
Jeremy Lee
  • 21
  • 1
  • For macOS, use `brew install llvm@9` and then `LLVM_CONFIG=/usr/local/opt/llvm@9/bin/llvm-config` (or similar for other LLVM versions) – damd Jan 25 '21 at 14:20
  • This worked for me _(note paths are different and LDFLAGS was important too)_ ```export LDFLAGS="-L/opt/homebrew/opt/llvm@11/lib" LLVM_CONFIG="/opt/homebrew/opt/llvm@11/bin/llvm-config" pip install numba``` – Geradlus_RU Jan 29 '22 at 23:15
0

Running llvm-config, I got:

llvm-config: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

That seemed to be causing the problem, so after a quick search I found a SO post that provided this fix:

$ sudo apt install libncurses5

After running pip install llvmlite again it worked.

Virinas-code
  • 180
  • 3
  • 14
0

This worked for me:

conda activate
conda create --name py37 python=3.7  # or just conda install python==3.7

And then the rest. I already had all the dependencies, when I got the errors you mentioned.