Monday, May 20, 2024
15
rated 0 times [  15] [ 0]  / answers: 1 / hits: 41280  / 1 Year ago, sun, february 26, 2023, 8:36:19

There are some earlier questions, most notably this, but they didn't help me. I am trying to install llvm version 10 (or 9) because it is a dependency for the pyod Python package. When trying to install, I get this error:


(.venv) user@desktop:/media/Projects/outliers$ pip install llvmlite
Collecting llvmlite
Using cached https://files.pythonhosted.org/packages/0b/96/07bfa93a103fb9e3e9ae7f9f7c6687ae714aee66b6f3000da3fad71e0aa2/llvmlite-0.34.0.tar.gz
Building wheels for collected packages: llvmlite
Running setup.py bdist_wheel for llvmlite ... error
Complete output from command /media/Projects/outliers/.venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-a4jzbt70/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
', '
');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpzu8welrdpip-wheel- --python-tag cp36:
running bdist_wheel
/media/Projects/outliers/.venv/bin/python3 /tmp/pip-build-a4jzbt70/llvmlite/ffi/build.py
LLVM version... 6.0.0

Traceback (most recent call last):
File "/tmp/pip-build-a4jzbt70/llvmlite/ffi/build.py", line 191, in <module>
main()
File "/tmp/pip-build-a4jzbt70/llvmlite/ffi/build.py", line 181, in main
main_posix('linux', '.so')
File "/tmp/pip-build-a4jzbt70/llvmlite/ffi/build.py", line 143, in main_posix
raise RuntimeError(msg)
RuntimeError: Building llvmlite requires LLVM 10.0.x or 9.0.x, got '6.0.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 '/media/Projects/outliers/.venv/bin/python3' failed with exit status 1

----------------------------------------
Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Failed to build llvmlite
Installing collected packages: llvmlite
Running setup.py install for llvmlite ... error
Complete output from command /media/Projects/outliers/.venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-a4jzbt70/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
', '
');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-xelmdsmd-record/install-record.txt --single-version-externally-managed --compile --install-headers /media/Projects/outliers/.venv/include/site/python3.6/llvmlite:
running install
running build
got version from file /tmp/pip-build-a4jzbt70/llvmlite/llvmlite/_version.py {'version': '0.34.0', 'full': 'c5889c9e98c6b19d5d85ebdd982d64a03931f8e2'}
running build_ext
/media/Projects/outliers/.venv/bin/python3 /tmp/pip-build-a4jzbt70/llvmlite/ffi/build.py
LLVM version... 6.0.0

Traceback (most recent call last):
File "/tmp/pip-build-a4jzbt70/llvmlite/ffi/build.py", line 191, in <module>
main()
File "/tmp/pip-build-a4jzbt70/llvmlite/ffi/build.py", line 181, in main
main_posix('linux', '.so')
File "/tmp/pip-build-a4jzbt70/llvmlite/ffi/build.py", line 143, in main_posix
raise RuntimeError(msg)
RuntimeError: Building llvmlite requires LLVM 10.0.x or 9.0.x, got '6.0.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 '/media/Projects/outliers/.venv/bin/python3' failed with exit status 1

----------------------------------------
Command "/media/Projects/outliers/.venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-a4jzbt70/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
', '
');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-xelmdsmd-record/install-record.txt --single-version-externally-managed --compile --install-headers /media/Projects/outliers/.venv/include/site/python3.6/llvmlite" failed with error code 1 in /tmp/pip-build-a4jzbt70/llvmlite/

I believe the most important line is this:


RuntimeError: Building llvmlite requires LLVM 10.0.x or 9.0.x, got '6.0.0'. Be sure to set LLVM_CONFIG to the right executable path.

If one tries to update it, it says 6.X is the newest:


user@desktop:~$ apt install llvm
Reading package lists... Done
Building dependency tree
Reading state information... Done
llvm is already the newest version (1:6.0-41~exp5~ubuntu1).
The following packages were automatically installed and are no longer required:
boinc-client golang-1.10-go golang-1.10-src golang-src libboinc7 libgsoap-2.8.60 libllvm10 libllvm10:i386 libnvidia-cfg1-440 libnvidia-common-435 libnvidia-common-440
libnvidia-compute-440 libnvidia-decode-440 libnvidia-ifr1-440 libvncserver1 linux-headers-4.15.0-106 linux-headers-4.15.0-106-generic linux-headers-4.15.0-115
linux-headers-4.15.0-115-generic linux-headers-5.4.0-45-generic linux-hwe-5.4-headers-5.4.0-45 python-fasteners python-monotonic python-pexpect python-ptyprocess
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.

I have also tried 1) using their apt deb sources (didn't work, nothing happens when added, latest version is still 6.X when using apt upgrade), and 2) downloading their files (no instructions given how to install).


More From » software-installation

 Answers
7

check how to install LLVM here https://apt.llvm.org/ to retrieve the archive signature like this:


wget --no-check-certificate -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -

Add the PPAs where to install from:


add-apt-repository 'deb http://apt.llvm.org/bionic/   llvm-toolchain-bionic-10  main'

Update packages:


sudo apt update

Install default llvm & llvm-config:


sudo apt install llvm

Install custom version: llvm-10 & llvm-config-10:


sudo apt-get install llvm-10 lldb-10 llvm-10-dev libllvm10 llvm-10-runtime

Use "update-alternatives" to config alternatives like this for "llvm-config":


sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-6.0 6
sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-10 10
sudo update-alternatives --config llvm-config

. . . and select: "1"


























Selection Path Priority Status
* 0 /usr/bin/llvm-config-6.0 6 auto mode 0
1 /usr/bin/llvm-config-10 10 auto mode 1


Press <enter> to keep the current choice[*], or type selection number: 1


[#2502] Monday, February 27, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
heathree

Total Points: 157
Total Questions: 132
Total Answers: 108

Location: Honduras
Member since Mon, Apr 5, 2021
3 Years ago
;