arrow: AttributeError: module 'pyarrow' has no attribute 'compat' upong importing pyarrow

Hi folks,

I just installed pyarrow with pip. Here is the output:

Collecting pyarrow
  Using cached https://files.pythonhosted.org/packages/c9/b8/076ebd968f3c6d4e9b6e5de696f0b19964a3d4b7dc020fd32db4e868ad74/pyarrow-0.10.0-cp36-cp36m-manylinux1_x86_64.whl
Requirement already satisfied: six>=1.0.0 in /opt/conda/lib/python3.6/site-packages (from pyarrow) (1.11.0)
Requirement already satisfied: numpy>=1.10 in /opt/conda/lib/python3.6/site-packages (from pyarrow) (1.13.3)
Installing collected packages: pyarrow
Successfully installed pyarrow-0.10.0

However when I try to import the package I get an errror:

AttributeError                            Traceback (most recent call last)
<ipython-input-12-f1048abcb32d> in <module>()
----> 1 import pyarrow

/opt/conda/lib/python3.6/site-packages/pyarrow/__init__.py in <module>()
     48 
     49 
---> 50 import pyarrow.compat as compat
     51 
     52 

AttributeError: module 'pyarrow' has no attribute 'compat'

I tried uninstalling and reinstalling but it did not help. Any ideas?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

Thanks @kszucs . I was able to replicate the issue.

If I install pyarrow with numpy version 1.13.1, I get the error.

If I uninstall numpy 1.13.1, install 1.15.1, and then install pyarrow (with pip) I can import pyarrow without error.

FYI @wesm …

Hmm. Installing with conda install -c conda-forge pyarrow fixes this issue. Let me know if you folks need any diagnostics to help debug.

This is a problem introduced by installing tensorflow: https://travis-ci.org/apache/arrow/jobs/421710986#L9970