arrow: ImportError on Ubuntu 18.04

I installed pyarrow from conda-forge and I’m getting this error on import:

>>> import pyarrow
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/chris/miniconda3/envs/ai/lib/python3.6/site-packages/pyarrow/__init__.py", line 47, in <module>
    from pyarrow.lib import cpu_count, set_cpu_count
ImportError: /home/chris/miniconda3/envs/ai/lib/python3.6/site-packages/pyarrow/../../../libparquet.so.1: undefined symbol: _ZNK5boost16re_detail_10650131cpp_regex_traits_implementationIcE9transformEPKcS4_

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 32 (20 by maintainers)

Commits related to this issue

Most upvoted comments

@eromoe Yesterday conda-forge switched their packages to new compilers. It might be worthwhile for you just to recreate your conda environments when you see such errors in the next days. That should more easily fix your problems.

@sephib As in the comment above, it seems that you have installed boost from defaults but pyarrow from conda-forge. Please either install all these packages from defaults or all from conda-forge. Due to one not yet having done the compiler migration, they’re incompatible.

I think this is still broken-ish. The following dockerfile results in a pyarrow installation that is broken with the _ZNK5arrow5Field8ToStringB5cxx11Ev problem:

FROM jupyter/datascience-notebook
RUN conda install -y -c conda-forge -c pytorch opencv tensorflow graphviz tqdm keras numba numpy tqdm pythreejs feather-format ffmpeg 

This is with the latest pull of jupyter/dockerscience-notebook, i.e. jupyter/datascience-notebook@sha256:2f7865853e27982ed98c314054ee62e10e1bea3b0e3bb6fafc9b7f68e9e887be

The workaround is presumably this:

FROM jupyter/datascience-notebook
RUN conda install -y -c conda-forge -c pytorch opencv tensorflow graphviz tqdm keras numba numpy tqdm pythreejs feather-format ffmpeg 
conda install arrow-cpp=0.12.* -c conda-forge

which then results in a working version of pyarrow. Package management is confusing 😃.

That’s great, thanks @kszucs!

Hi, Thank you very much for your reply and solution I updated all the packages to be from conda-forge and it workes now. Thx