Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to install llvmlite on Raspberry Pi 4 #622

Closed
ViliamVadocz opened this issue Aug 18, 2020 · 4 comments
Closed

Failing to install llvmlite on Raspberry Pi 4 #622

ViliamVadocz opened this issue Aug 18, 2020 · 4 comments

Comments

@ViliamVadocz
Copy link

I am trying to install llvmlite on my Raspberry Pi 4 (Model B).

When I try pip3 install llvmlite I get this:

pi@raspberrypi:~ $ pip3 install llvmlite
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
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 /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ctz6mobg/llvmlite/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 /tmp/pip-wheel-qx3uri_w --python-tag cp37:
  running bdist_wheel
  /usr/bin/python3 /tmp/pip-install-ctz6mobg/llvmlite/ffi/build.py
  LLVM version... 7.0.1
  
  Traceback (most recent call last):
    File "/tmp/pip-install-ctz6mobg/llvmlite/ffi/build.py", line 191, in <module>
      main()
    File "/tmp/pip-install-ctz6mobg/llvmlite/ffi/build.py", line 181, in main
      main_posix('linux', '.so')
    File "/tmp/pip-install-ctz6mobg/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 '7.0.1'. 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 '/usr/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 /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ctz6mobg/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 /tmp/pip-record-5ychz866/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    running install
    running build
    got version from file /tmp/pip-install-ctz6mobg/llvmlite/llvmlite/_version.py {'version': '0.34.0', 'full': 'c5889c9e98c6b19d5d85ebdd982d64a03931f8e2'}
    running build_ext
    /usr/bin/python3 /tmp/pip-install-ctz6mobg/llvmlite/ffi/build.py
    LLVM version... 7.0.1
    
    Traceback (most recent call last):
      File "/tmp/pip-install-ctz6mobg/llvmlite/ffi/build.py", line 191, in <module>
        main()
      File "/tmp/pip-install-ctz6mobg/llvmlite/ffi/build.py", line 181, in main
        main_posix('linux', '.so')
      File "/tmp/pip-install-ctz6mobg/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 '7.0.1'. 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 '/usr/bin/python3' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ctz6mobg/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 /tmp/pip-record-5ychz866/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-ctz6mobg/llvmlite/

The docs mention that I don't need to install LLVM, but I tried apt-get install llvm anyway. It didn't seem to help. I am primarily a Windows user so I am not that familiar with apt-get but I also tried apt-get install llvm=10.0.0, but I received an error: Version '10.0.0' for 'llvm' was not found.

I tried pip3 install librosa==0.4.2 mentioned in an old issue, but that also seemed to do nothing useful.

Do you have any suggestions for what else I could try?

@stuartarchibald
Copy link
Contributor

Thanks for the report. The installation instructions for Numba (which depends on llvmlite) should work as they will provide binary packages (not sure which OS you are running, 32 or 64 bit, but one of these should work):

@ViliamVadocz
Copy link
Author

ViliamVadocz commented Aug 18, 2020

Thank you very much!

I ran lscpu and found that I have ARMv7l architecture. I installed berryconda and with that I was able to install llvmlite. It works great, except for the fact that berryconda is python 3.6. I would much prefer python 3.7+

My original was problem solved so I am closing this issue, but if you know of a way to get berryconda to work for python 3.7+, please let me know.

@jainharshita275
Copy link

I tried berryconda, miniconda but getting no success in installing llvmlite package. I am having ARMv7I architecture.

@jainharshita275
Copy link

pi@raspberrypi:~ $ conda install llvmlite
Fetching package metadata .....

PackageNotFoundError: Package missing in current linux-aarch64 channels:

  • llvmlite
    ..........................................
    pi@raspberrypi:~ $ pip install llvmlite
    Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
    Collecting llvmlite
    Using cached llvmlite-0.36.0.tar.gz (126 kB)
    Preparing metadata (setup.py) ... done
    Building wheels for collected packages: llvmlite
    Building wheel for llvmlite (setup.py) ... error
    ERROR: Command errored out with exit status 1:
    command: /home/pi/berryconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-t1xx2jb4/llvmlite_98f0b002214d4beda34d73dca17ab8a9/setup.py'"'"'; file='"'"'/tmp/pip-install-t1xx2jb4/llvmlite_98f0b002214d4beda34d73dca17ab8a9/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-06e5g_9v
    cwd: /tmp/pip-install-t1xx2jb4/llvmlite_98f0b002214d4beda34d73dca17ab8a9/
    Complete output (15 lines):
    running bdist_wheel
    /home/pi/berryconda3/bin/python /tmp/pip-install-t1xx2jb4/llvmlite_98f0b002214d4beda34d73dca17ab8a9/ffi/build.py
    LLVM version... 7.0.1

Traceback (most recent call last):
File "/tmp/pip-install-t1xx2jb4/llvmlite_98f0b002214d4beda34d73dca17ab8a9/ffi/build.py", line 220, in
main()
File "/tmp/pip-install-t1xx2jb4/llvmlite_98f0b002214d4beda34d73dca17ab8a9/ffi/build.py", line 210, in main
main_posix('linux', '.so')
File "/tmp/pip-install-t1xx2jb4/llvmlite_98f0b002214d4beda34d73dca17ab8a9/ffi/build.py", line 172, in main_posix
raise RuntimeError(msg)
RuntimeError: Building llvmlite requires LLVM 10.0.x or 9.0.x, got '7.0.1'. 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 '/home/pi/berryconda3/bin/python' failed with exit status 1

ERROR: 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
ERROR: Command errored out with exit status 1:
command: /home/pi/berryconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-t1xx2jb4/llvmlite_98f0b002214d4beda34d73dca17ab8a9/setup.py'"'"'; file='"'"'/tmp/pip-install-t1xx2jb4/llvmlite_98f0b002214d4beda34d73dca17ab8a9/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-hp798ma9/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/berryconda3/include/python3.6m/llvmlite
cwd: /tmp/pip-install-t1xx2jb4/llvmlite_98f0b002214d4beda34d73dca17ab8a9/
Complete output (18 lines):
running install
running build
got version from file /tmp/pip-install-t1xx2jb4/llvmlite_98f0b002214d4beda34d73dca17ab8a9/llvmlite/_version.py {'version': '0.36.0', 'full': 'e6bb8d137d922bec8beeb01a237254778759becd'}
running build_ext
/home/pi/berryconda3/bin/python /tmp/pip-install-t1xx2jb4/llvmlite_98f0b002214d4beda34d73dca17ab8a9/ffi/build.py
LLVM version... 7.0.1

Traceback (most recent call last):
  File "/tmp/pip-install-t1xx2jb4/llvmlite_98f0b002214d4beda34d73dca17ab8a9/ffi/build.py", line 220, in <module>
    main()
  File "/tmp/pip-install-t1xx2jb4/llvmlite_98f0b002214d4beda34d73dca17ab8a9/ffi/build.py", line 210, in main
    main_posix('linux', '.so')
  File "/tmp/pip-install-t1xx2jb4/llvmlite_98f0b002214d4beda34d73dca17ab8a9/ffi/build.py", line 172, in main_posix
    raise RuntimeError(msg)
RuntimeError: Building llvmlite requires LLVM 10.0.x or 9.0.x, got '7.0.1'. 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 '/home/pi/berryconda3/bin/python' failed with exit status 1
----------------------------------------

ERROR: Command errored out with exit status 1: /home/pi/berryconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-t1xx2jb4/llvmlite_98f0b002214d4beda34d73dca17ab8a9/setup.py'"'"'; file='"'"'/tmp/pip-install-t1xx2jb4/llvmlite_98f0b002214d4beda34d73dca17ab8a9/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-hp798ma9/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/berryconda3/include/python3.6m/llvmlite Check the logs for full command output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants