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.

Installer doesn't create llvmlite/binding/libllvmlite.so library in venv

See original GitHub issue

My setup: Python 3.5.2, virtualenv, Ubuntu xenial, llvm 4.0, newest pip and distutils:

(env) skodajan@jan:/tmp$ LLVM_CONFIG=/usr/bin/llvm-config-4.0 pip install llvmlite
Collecting llvmlite
  Using cached llvmlite-0.17.0.tar.gz
Installing collected packages: llvmlite
  Running setup.py install for llvmlite ... done
Successfully installed llvmlite-0.17.0
(env) skodajan@jan:/tmp$ ls env/lib/python3.5/site-packages/llvmlite/binding/
analysis.py  dylib.py            ffi.py       __init__.py  module.py       options.py       __pycache__                            targets.py     value.py
common.py    executionengine.py  initfini.py  linker.py    object_file.py  passmanagers.py  _stub.cpython-35m-x86_64-linux-gnu.so  transforms.py

Once I install numba, the import numba fails:

(env) skodajan@jan:/tmp$ pip install numba
Collecting numba
Collecting numpy (from numba)
  Using cached numpy-1.12.1-cp35-cp35m-manylinux1_x86_64.whl
Requirement already satisfied: llvmlite in ./env/lib/python3.5/site-packages (from numba)
Installing collected packages: numpy, numba
Successfully installed numba-0.32.0 numpy-1.12.1
(env) skodajan@jan-skoda:/tmp$ python -c 'import numba'
Traceback (most recent call last):
  File "/tmp/env/lib/python3.5/site-packages/llvmlite/binding/ffi.py", line 42, in <module>
    lib = ctypes.CDLL(os.path.join(_lib_dir, _lib_name))
  File "/usr/lib/python3.5/ctypes/__init__.py", line 347, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /tmp/env/lib/python3.5/site-packages/llvmlite/binding/libllvmlite.so: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/env/lib/python3.5/site-packages/numba/__init__.py", line 9, in <module>
    from . import config, errors, runtests, types
  File "/tmp/env/lib/python3.5/site-packages/numba/config.py", line 11, in <module>
    import llvmlite.binding as ll
  File "/tmp/env/lib/python3.5/site-packages/llvmlite/binding/__init__.py", line 6, in <module>
    from .dylib import *
  File "/tmp/env/lib/python3.5/site-packages/llvmlite/binding/dylib.py", line 4, in <module>
    from . import ffi
  File "/tmp/env/lib/python3.5/site-packages/llvmlite/binding/ffi.py", line 47, in <module>
    lib = ctypes.CDLL(_lib_name)
  File "/usr/lib/python3.5/ctypes/__init__.py", line 347, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libllvmlite.so: cannot open shared object file: No such file or directory

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:20 (11 by maintainers)

github_iconTop GitHub Comments

5reactions
st-pashacommented, Apr 12, 2017

I have a similar problem with the following setup: MacOS 10.11.3, Python 3.6.0 virtual environment, explicitly specified environment variables LLVM_CONFIG and MACOSX_DEPLOYMENT_TARGET. Running pip install llvmlite --upgrade attempts to install llvm 0.17.1, but then throws the following error:

Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/k9/mxm_jrl50m75kmgvdk9_wlh00000gp/T/pip-build-1bk4oqiv/llvmlite/setup.py", line 175, in <module>
      ext_modules=[ext_stub] if not sys.platform.startswith('win32') else [],
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/private/var/folders/k9/mxm_jrl50m75kmgvdk9_wlh00000gp/T/pip-build-1bk4oqiv/llvmlite/setup.py", line 119, in run
      raise RuntimeError("missing {}".format(path))
  RuntimeError: missing llvmlite/binding/libllvmlite.dylib

(installation then proceeds to install llvmlite, however the installed module is not usable)

4reactions
sklamcommented, Apr 13, 2017

@leftys , I am temporarily hosting the wheel on anaconda.org. You need to install it with the following command:

pip install -i https://pypi.anaconda.org/sklam/simple llvmlite

If you can confirm it working, I will move it to PyPI.

(Note: I have to stage it in anaconda.org because PyPI won’t allow a file to be re-uploaded)

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip installing does not install to virtualenv - Stack Overflow
I'm on a Mac, trying to build a Django website. Example: With the virtual machine activated. I type: python -m pip install Django....
Read more >
Installing packages using pip and virtual environments
This guide discusses how to install packages using pip and a virtual environment manager: either venv for Python 3 or virtualenv for Python...
Read more >
Python Packages and Virtual Environments - Baylor University
You can create your own private "copy" of python, i.e., a virtual environment, in which you can install specific packages that aren't installed...
Read more >
Installing and using virtualenv with Python 3
Overview Virtualenv is a tool used to create an isolated Python ... has its own installation directories that doesn't share libraries with ...
Read more >
Python Project Setup – Virtual Environments and Package ...
Since Python 3.3 venv is part of the standard library and therefore ... To create a virtual environment with venv you can start...
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