Repository navigation
Closed
Description
Seeing this on CIs. Looks like a packaging issue actually as it is missing boost. Maybe related to PR ( conda-forge/parquet-cpp-feedstock#43 ).
Details
=================================== FAILURES ===================================
_________________________ test_parquet_pyarrow[hdfs3] __________________________
mod_name = 'pyarrow', error_msg = '`pyarrow` not installed'
def import_required(mod_name, error_msg):
"""Attempt to import a required dependency.
Raises a RuntimeError if the requested module is not available.
"""
try:
> return import_module(mod_name)
dask/utils.py:92:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = 'pyarrow', package = None
def import_module(name, package=None):
"""Import a module.
The 'package' argument is required when performing a relative import. It
specifies the package to use as the anchor point from which to resolve the
relative import to an absolute import.
"""
level = 0
if name.startswith('.'):
if not package:
msg = ("the 'package' argument is required to perform a relative "
"import for {!r}")
raise TypeError(msg.format(name))
for character in name:
if character != '.':
break
level += 1
> return _bootstrap._gcd_import(name[level:], package, level)
/opt/conda/lib/python3.6/importlib/__init__.py:126:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = 'pyarrow', package = None, level = 0
> ???
<frozen importlib._bootstrap>:994:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = 'pyarrow', import_ = <function _gcd_import at 0x7f105ba66e18>
> ???
<frozen importlib._bootstrap>:971:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = 'pyarrow', import_ = <function _gcd_import at 0x7f105ba66e18>
> ???
<frozen importlib._bootstrap>:955:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
spec = ModuleSpec(name='pyarrow', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f102ff02c50>, origin='/opt...n3.6/site-packages/pyarrow/__init__.py', submodule_search_locations=['/opt/conda/lib/python3.6/site-packages/pyarrow'])
> ???
<frozen importlib._bootstrap>:665:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_frozen_importlib_external.SourceFileLoader object at 0x7f102ff02c50>
module = <module 'pyarrow' from '/opt/conda/lib/python3.6/site-packages/pyarrow/__init__.py'>
> ???
<frozen importlib._bootstrap_external>:678:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
f = <built-in function exec>
args = (<code object <module> at 0x7f102fef2c00, file "/opt/conda/lib/python3.6/site-packages/pyarrow/__init__.py", line 20>,...cached__': '/opt/conda/lib/python3.6/site-packages/pyarrow/__pycache__/__init__.cpython-36.pyc', '__doc__': None, ...})
kwds = {}
> ???
<frozen importlib._bootstrap>:219:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
from pkg_resources import get_distribution, DistributionNotFound
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
try:
# This code is duplicated from setup.py to avoid a dependency on each
# other.
def parse_version(root):
from setuptools_scm import version_from_scm
import setuptools_scm.git
describe = (setuptools_scm.git.DEFAULT_DESCRIBE +
" --match 'apache-arrow-[0-9]*'")
# Strip catchall from the commandline
describe = describe.replace("--match *.*", "")
version = setuptools_scm.git.parse(root, describe)
if not version:
return version_from_scm(root)
else:
return version
import setuptools_scm
__version__ = setuptools_scm.get_version('../', parse=parse_version)
except (ImportError, LookupError):
__version__ = None
> from pyarrow.lib import cpu_count, set_cpu_count
E ImportError: libboost_regex.so.1.66.0: cannot open shared object file: No such file or directory
/opt/conda/lib/python3.6/site-packages/pyarrow/__init__.py:47: ImportError
During handling of the above exception, another exception occurred:
hdfs = hdfs://localhost:8020, Connected
@require_pyarrow
def test_parquet_pyarrow(hdfs):
dd = pytest.importorskip('dask.dataframe')
import pandas as pd
import numpy as np
fn = '%s/test.parquet' % basedir
hdfs_fn = 'hdfs://%s' % fn
df = pd.DataFrame(np.random.normal(size=(1000, 4)),
columns=list('abcd'))
ddf = dd.from_pandas(df, npartitions=4)
> ddf.to_parquet(hdfs_fn, engine='pyarrow')
dask/bytes/tests/test_hdfs.py:245:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dask/dataframe/core.py:1045: in to_parquet
return to_parquet(self, path, *args, **kwargs)
dask/dataframe/io/parquet.py:892: in to_parquet
write = get_engine(engine)['write']
dask/dataframe/io/parquet.py:749: in get_engine
import_required('pyarrow', "`pyarrow` not installed")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mod_name = 'pyarrow', error_msg = '`pyarrow` not installed'
def import_required(mod_name, error_msg):
"""Attempt to import a required dependency.
Raises a RuntimeError if the requested module is not available.
"""
try:
return import_module(mod_name)
except ImportError:
> raise RuntimeError(error_msg)
E RuntimeError: `pyarrow` not installed
dask/utils.py:94: RuntimeError
------------------------------ Captured log setup ------------------------------
core.py 137 DEBUG Connect to handle 94361929179216
=============== 1 failed, 10 passed, 13 skipped in 11.03 seconds ===============
The command "if [[ $TEST_HDFS == 'true' ]]; then source continuous_integration/hdfs/run_tests.sh; fi" exited with 1.Metadata
Metadata
Assignees
Labels
No labels
Activity
jakirkham commentedon Mar 28, 2018
Looking more closely it seems like these are using dev builds from
twosigma. So the linked PR did not cause the issue. Though it may highlight what is going wrong. IOW the package now depends on Boost.Regex in shared library form, but doesn't explicitly listboostas dependency. May be fixed by listing the dependency or statically linking those pieces.mrocklin commentedon Mar 28, 2018
wesm commentedon Mar 28, 2018
Yes, you can use the 0.9.0 conda-forge binaries now. We need to fix the nightlies, though cc @cpcloud
cpcloud commentedon Mar 28, 2018
The nightlies are working again, I fixed them yesterday or the day before: https://anaconda.org/twosigma/repo
jakirkham commentedon Mar 28, 2018
Still failing with the same issue as of an hour ago.
jakirkham commentedon Apr 5, 2018
How would we like to proceed here?
mrocklin commentedon Apr 5, 2018
Here is a recent failure with the nightly pyarrow
cpcloud commentedon Apr 5, 2018
I can try to take a look at this today but I'm pretty swamped at work this week. I will have more time over the weekend to dig in.
mrocklin commentedon Apr 5, 2018
mrocklin commentedon Apr 5, 2018
jakirkham commentedon May 8, 2018
Are we comfortable marking that test as a known failure?
wesm commentedon May 8, 2018
@cpcloud @kszucs @pitrou any idea what's up with the nightlies here?
pitrou commentedon May 8, 2018
I don't know. AFAIR we should not depend on
libboost_regex.soanymore, but apparently ourCMakeLists.txtstill lists it?kszucs commentedon May 8, 2018
I've tried to reproduce the container. I don't know how much it helps, but here is the output:
Inside the container
@pitrou Is it OK that the versions are mismatching?
cpcloud commentedon May 8, 2018
That looks screwy, and on my local machine I get matching versions.
6 remaining items
jakirkham commentedon May 9, 2018
Don't think that
condais the issue with the CI builds though. Checked locally already.Though the error seems to be correct. How is the SONAME being set?
cpcloud commentedon May 9, 2018
@jakirkham, it matters that conda is updating at the same time as arrow is being installed. I don't know why. As I say above
you must first update conda and then install arrow.
i don't think this is an SO issue, since conda is not installing the correct dependencies. it does install the correct dependencies when you first update conda and then install arrow
cpcloud commentedon May 9, 2018
The SO version wasn't being set previously, and now it is as of this PR. Maybe that's related, but I'm not sure how that explains conda wanting to install mismatched versions.
jakirkham commentedon May 9, 2018
Sorry, missed that. Though just updating
condain the Docker container alone seems to give me the same error, which is pretty odd.cpcloud commentedon May 9, 2018
Right, so the install only works correctly if you pass the
--allflag and you install from-c conda-forge. I'm not sure how any of that affects how dependencies are calculated.jakirkham commentedon May 9, 2018
Yep, looking into it ATM. Think I have an idea.
jakirkham commentedon May 9, 2018
Went ahead and just upgraded
condato4.5.3fromconda-forgefor what follows. Not sure if it is necessary to fix the issue, but it seems like a good idea given how oldcondais in the image.So it looks like there are two things that need to happen. There needs to be a newer copy of
boost-cppand a newer copy ofprotobuf. Upgrading both of these fixes the issue.Weird side story, simply upgrading
boost-cppis not sufficient ascondapull in an ancient version ofboostas well (details below). No idea why this happens. Any ideas, @kalefranz?Details
Workaround is to install
boost, which pulls in newer versions ofboostandboost-cpp.Details
Of course that is not enough, we need to install
boostand upgradeprotobuf.Details
Once that is done installing
pyarrowworks smoothly and pulls in the right versions.Details
Not sure where the Docker image is being maintained or who is maintaining it, but it looks like we need a rebuild.
cpcloud commentedon May 9, 2018
@jakirkham Do you know what the relationship between
boostandboost-cppis? They appear to have very similarbuild.shscripts differing only in their inclusion (or not) of boost python.jakirkham commentedon May 9, 2018
That is the difference. Originally
boosthad everything, but users wanted to break out the C++ parts and depend on only them (if they didn't needpythonfor instance). So we addedboost-cppwith just the C++ parts.boostonly packages thepythonparts since that split, but depends onboost-cppin order to preserve the same user interface. There is a similar relationship betweenlibprotobufandprotobuf.jakirkham commentedon Jun 16, 2018
Proposing we mark this test matrix item as a know failure until someone has time to fix it. ( #3626 )
wesm commentedon Jun 27, 2018
Any actions we can take on the Arrow side to help with this?
jakirkham commentedon Jun 30, 2018
The main issue is the Docker image used for this test needs to be rebuilt with newer packages. @mrocklin, any idea how we can make this happen?
mrocklin commentedon Jun 30, 2018
I haven't been active on this part of the code so no, I'm probably not the right person. I suspect that git blame would show that @jcrist was the last person here, but I suspect that today @martindurant is the most likely person to solve this (if he has the time).
jakirkham commentedon Jul 2, 2018
As noted, the only thing I think we need to do is rebuild the Docker image. So if it is an autobuild on Docker Hub, someone just needs to click the "Trigger" button in the "Build Settings" page.