Forums

Can numba be installed?

Numba is a very useful library to provide cython-like speedups for numerical code with just a few decorators. It comes with the Anaconda distribution but I've been unable to set it up on PA. I get stuck at deploying llvm-config, which I hope you guys can handle... thanks!

Instructions here: http://numba.pydata.org/llvm-py/doc/userguide.html

Hi there,

We'll take a look and see if we can get it packaged up next time we do a server image update... That may be several weeks away though.

For now, you might be able to get it working manually by downloading a precompiled version of llvm, and building against that somehow, but it's beyond my own compile-fu...

sergiolucerovera's link is now a 404...

I would like to install numba myself, but am stuck with the error:

Command "/home/{user]/.virtualenvs/venv-scim-py35/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-t0iy_q6j/llvmlite/setup.py';exec(compile(get
attr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-winleocz-record/install-record.txt --single-version-ext
ernally-managed --compile --install-headers /home/{user}/.virtualenvs/venv-scim-py35/include/site/python3.5/llvmlite" failed with error code 1 in /tmp/pip-build-t0iy_q6
j/llvmlite/

Can't tell much from that error message, except that it looks like an llvm compile step failed.

Here's some more error info. My guess is that llvm isn't installed; at least I don't find anything interesting with find / -name *llvm*

Errors after pip3.5 install numba:

Building wheels for collected packages: llvmlite
  Running setup.py bdist_wheel for llvmlite ... error
  Complete output from command /home/user/.virtualenvs/venv-scim-py35/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-tuw38vzu/llvmlite/setu
p.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpu0usvgxwpip-wheel- --python-tag cp35
:
  running bdist_wheel
  running build
  got version from file /tmp/pip-build-tuw38vzu/llvmlite/llvmlite/_version.py {'version': '0.11.0', 'full': 'bb25ba4f07b4b6ba8242fe6d82aa66601ddf7e14'}
  running build_ext
  /home/user/.virtualenvs/venv-scim-py35/bin/python3.5 /tmp/pip-build-tuw38vzu/llvmlite/ffi/build.py
  LLVM version... Traceback (most recent call last):
    File "/tmp/pip-build-tuw38vzu/llvmlite/ffi/build.py", line 105, in main_posix
      out = subprocess.check_output([llvm_config, '--version'])
    File "/usr/lib/python3.5/subprocess.py", line 629, in check_output
      **kwargs).stdout
    File "/usr/lib/python3.5/subprocess.py", line 696, in run
      with Popen(*popenargs, **kwargs) as process:
    File "/usr/lib/python3.5/subprocess.py", line 950, in __init__
      restore_signals, start_new_session)
    File "/usr/lib/python3.5/subprocess.py", line 1544, in _execute_child
      raise child_exception_type(errno_num, err_msg)
  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 "/tmp/pip-build-tuw38vzu/llvmlite/ffi/build.py", line 152, in <module>
      main()
    File "/tmp/pip-build-tuw38vzu/llvmlite/ffi/build.py", line 142, in main
      main_posix('linux', '.so')
    File "/tmp/pip-build-tuw38vzu/llvmlite/ffi/build.py", line 108, in main_posix
      "to the path for llvm-config" % (llvm_config,))
  RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
  error: command '/home/user/.virtualenvs/venv-scim-py35/bin/python3.5' failed with exit status 1

Interesting, I thought we had all of that installed but clearly we don't. I've made a note to try to install it (which should be reasonably easy) for our next system update, but unfortunately that won't be for a while :-(

OK, thanks. What's "a while"?

Hard to make promises I'm afraid. We usually do a server image every 6 to 8 weeks, but we can't promise the next one will necessarily include numba -- it all depends on how much time we have for digging into complicated installs. We will take a look though!

Hello, I would be interested in having numba as well. Given the last response on such a request by another user was on 2016, I assume it is still not available?

I am using python 3.7 and tried installing with pip3 but it fails with a lot of errors, the most relevant seems to be that one: RuntimeError: Broken toolchain: cannot link a simple C++ program. note: A compiler with support for C++11 language features is required.

Thanks, Pierre

@pierrebourgault You need to update your system image. See https://help.pythonanywhere.com/pages/ChangingSystemImage/