Closed yuhsak closed 2 years ago
First of all, I'd like to say a big thank you to the vaex team. I'm using this library almost every day and it really is a life saver for me.
Thanks for lettings us know!
I used to use Dask and the standalone Spark to deal with a such situation, but unfortunately both has each difficulties and inconveniences which are difficult to ignore for me, so I started using Vaex and am being amazed at its stability and efficiency.
that is exactly where vaex shines, postponing having to work with more complex libraries.
Thank you for the report, that's really annoying. I'd like to hear from other people if they have the same issue. @JovanVeljanoski could you try to reproduce this on your M1?
Hi,
Installing from conda/mamba works just fine both python 3.8 and 3.9. Been using it almost daily for a couple of months.
Installing from pip indeed fails for me, for both py 3.8 and 3.9. The main problems seem to be
Having trouble with this as well!
MacOS: 12.2
Python: 3.9.10 and 3.10.2 virtualenvs
Install method: poetry add vaex
, which uses pip 22.0.4 under the hood.
This fails with RuntimeError: Could not find a llvm-config binary
while installing llvmlite. It looks like they're working on it over at https://github.com/numba/llvmlite/issues/693, is there a good way to work around this for now?
As @JovanVeljanoski suggest using conda/mambda works for me too using python3.9 π
Steps
conda install mamba -n base -c conda-forge #install mamba into base environment
conda create --name myenv python=3.9 #create environment
conda activate myenv #create environment
mamba install vaex -c conda-forge #install vaex
got this bug too on Mac M1 too, I have no idea how to fix it:
from .superstrings import *
ImportError: dlopen(/Users/****/Projects/****/.venv/lib/python3.9/site-packages/vaex/superstrings.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '__ZN7pcrecpp2RE6no_argE'
Ditto; first attempt to experiment with vaex
, but can't import after pip install
.
Also an Apple Silicon Mac (macOS 12.4, M1 Pro):
ImportError: dlopen(/.../python3.9/site-packages/vaex/superstrings.cpython-39-darwin.so, 0x0002):
symbol not found in flat namespace '__ZN7pcrecpp2RE6no_argE'
Also: not in a position to use conda
- environment is constrained.
Update: only compiling locally worked - pip install vaex --no-binary :all:
(version: vaex v4.9.2)
Receiving the exact same error as @alexander-beedie on an Apple Silicon Mac (macOS 12.2.1, M1 Pro). However, strangely enough, this issue does not occur on an identical machine after installing vaex in an identical virtual environment.
FYI, I've been "solving" this on my end by running a second terminal in Rosetta and pip install
'ing it with that Rosetta terminal. Here are the instructions I used for setting up a Rosetta terminal:
I'm getting the same error using python 3.9 on a mac M1 using homebrew after doing a pip install.
It seems that /opt/homebrew/lib/python3.9/site-packages/vaex/superstrings.cpython-39-darwin.so didn't get linked to the pcre library.
I have pcre installed via brew (brew install pcre
) and can pre-load the library using
export DYLD_INSERT_LIBRARIES=/opt/homebrew/Cellar/pcre/8.45/lib/libpcrecpp.dylib
(assuming bash).
After this importing vaex from python3.9 works fro me. So this might be a possible workaround until it got fixed.
The homebrew path might vary for people, but you can check with brew ls pcre
what your path should be.
Checking which libraries are linked in superstrings doesn't link pcre, which I think it should:
otool -L /opt/homebrew/lib/python3.9/site-packages/vaex/superstrings.cpython-39-darwin.so
/opt/homebrew/lib/python3.9/site-packages/vaex/superstrings.cpython-39-darwin.so:
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1200.3.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0)
It seems that /opt/homebrew/lib/python3.9/site-packages/vaex/superstrings.cpython-39-darwin.so didn't get linked to the pcre library.
This triggered the right thoughts for me! Thanks!
I now see this in the logs:
2022-07-25T10:56:21.4013800Z [7/25] Linking CXX shared module superstrings.cpython-39-darwin.so
2022-07-25T10:56:21.4115880Z ld: warning: ignoring file /usr/local/lib/libpcre.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
2022-07-25T10:56:21.4217910Z ld: warning: ignoring file /usr/local/lib/libpcrecpp.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
For #2124
Really hope we can fix this soon!
Costed me some blood, sweat, and tears, but it's working now on mac+arm π :
$ pip install vaex-core==4.11.0
Costed me some blood, sweat, and tears, but it's working now on mac+arm π :
Fantastic; thanks very much for this - can confirm it's working! (And thanks to @arunpersaud for narrowing it down :)
@maartenbreddels
Wow I see now it works only with pip install vaex-core
on my M1 MBP.
Thank you very much for the contribution! That's amazing.
First of all, I'd like to say a big thank you to the vaex team. I'm using this library almost every day and it really is a life saver for me.
There seems to be a lot of options for both case processing huge datasets on distributed clusters through a sufficient economic budget, and processing small datasets on single machine. But the situation would suddenly be becoming harder to find an efficient solution when one needs to deal with large datasets that are too big to process on a single machine, but too small for a real distributed cluster.
I used to use Dask and the standalone Spark to deal with a such situation, but unfortunately both has each difficulties and inconveniences which are difficult to ignore for me, so I started using Vaex and am being amazed at its stability and efficiency.
By the way, I've got some question about installation. Let me describe it.
Description It downloads prebuilt wheel and successfully finishes when I try to install vaex from PyPI on m1 mac simply through pip. But after that, it raises an ImportError related to
superstrings.cpython-39-darwin.so
when I import vaex from python script. This also happens even when I try to install from conda-forge through miniconda.It seems to be somehow caused by incompatible prebuilt superstrings shared object. Is that a known issue already? I just wonder if there were any checks/tests that I could help for this so let me know if there were, and also in case if it's a specific issue happens only in my environment, please just ignore this question.
I still can build vaex from source code or just through pip command using
--no-binary
option with PCRE from Homebrew, then that error goes away.Software information
4.8.0
pip
macOS 12.1
(arm64)3.9.9
(from pyenv)22.0.3
Additional information
Installation log when the error happens (using prebuilt wheel )
Installation log when the error doesn't happen (build locally)