Skip to content
This repository was archived by the owner on Aug 12, 2020. It is now read-only.
This repository was archived by the owner on Aug 12, 2020. It is now read-only.

pip install monetdblite on linux installs Mach-O binary #201

@padelt

Description

@padelt

It seems as if the wheel delivers a Mac binary for libmonetdb5.so.

Broken:

docker run -it --rm python:3.6 bash -c 'pip install numpy && pip install monetdblite && file /usr/local/lib/python3.6/site-packages/monetdblite/libmonetdb5.so && python -c "import monetdblite"'
Collecting numpy
  Downloading https://files.pythonhosted.org/packages/71/90/ca61e203e0080a8cef7ac21eca199829fa8d997f7c4da3e985b49d0a107d/numpy-1.14.3-cp36-cp36m-manylinux1_x86_64.whl (12.2MB)
    100% |████████████████████████████████| 12.2MB 968kB/s
Installing collected packages: numpy
Successfully installed numpy-1.14.3
Collecting monetdblite
  Downloading https://files.pythonhosted.org/packages/7c/c9/e6ae712fb1713b771d552220414c2d90efdc9958fbc8e1c426e5ef665644/monetdblite-0.2.0-py3-none-any.whl (2.3MB)
    100% |████████████████████████████████| 2.4MB 410kB/s
Installing collected packages: monetdblite
Successfully installed monetdblite-0.2.0
/usr/local/lib/python3.6/site-packages/monetdblite/libmonetdb5.so: Mach-O 64-bit x86_64 dynamically linked shared library
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/monetdblite/__init__.py", line 13, in <module>
    from monetdblite import connections
  File "/usr/local/lib/python3.6/site-packages/monetdblite/connections.py", line 7, in <module>
    from monetdblite import cursors
  File "/usr/local/lib/python3.6/site-packages/monetdblite/cursors.py", line 9, in <module>
    from monetdblite import embeddedmonetdb
  File "/usr/local/lib/python3.6/site-packages/monetdblite/embeddedmonetdb.py", line 32, in <module>
    libs[0]), mode=ctypes.RTLD_GLOBAL)
  File "/usr/local/lib/python3.6/ctypes/__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /usr/local/lib/python3.6/site-packages/monetdblite/libmonetdb5.so: invalid ELF header

Workaround by forcing non-wheel installation:

docker run -it --rm python:3.6 bash -c 'pip install numpy && pip install --no-binary monetdblite monetdblite && file /usr/local/lib/python3.6/site-packages/monetdblite/libmonetdb5.so && python -c "import monetdblite"'
Collecting numpy
  Downloading https://files.pythonhosted.org/packages/71/90/ca61e203e0080a8cef7ac21eca199829fa8d997f7c4da3e985b49d0a107d/numpy-1.14.3-cp36-cp36m-manylinux1_x86_64.whl (12.2MB)
    100% |████████████████████████████████| 12.2MB 798kB/s
Installing collected packages: numpy
Successfully installed numpy-1.14.3
Collecting monetdblite
  Downloading https://files.pythonhosted.org/packages/b4/70/7e3d21f31c01f0bf6f4814248a372799a9dc0572f2a2eadff2387c86c4dd/monetdblite-0.2.0.tar.gz (2.2MB)
    100% |████████████████████████████████| 2.2MB 957kB/s
Skipping bdist_wheel for monetdblite, due to binaries being disabled for it.
Installing collected packages: monetdblite
  Running setup.py install for monetdblite ... done
Successfully installed monetdblite-0.2.0
/usr/local/lib/python3.6/site-packages/monetdblite/libmonetdb5.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=1dc9c59c4031ca18ffc9eed3778d13eac3d6975d, not stripped

Note the use of --no-binary monetdblite to make it work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions