You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Jim Pivarski (JIRA)" <ji...@apache.org> on 2016/10/18 22:33:58 UTC

[jira] [Commented] (ARROW-230) Python: Do not name modules like native ones (i.e. rename pyarrow.io)

    [ https://issues.apache.org/jira/browse/ARROW-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15586886#comment-15586886 ] 

Jim Pivarski commented on ARROW-230:
------------------------------------

Actually, I encounter this bug every time.

I don't know how to get my Python environment to `setup.py build_ext --inplace` without encountering an `import io` that doesn't yield `undefined symbol: pyarrow_ARRAY_API`. Even if I clean the build directory and start over, I hit cases with an `import io` in `.local/lib/python2.7/site-packages/pkg_resources` or `numpy/lib/format.py`.

Using the 0.1.0 release.

I was going to use pyarrow to explore the structure of the C++ API; everything else built correctly.


> Python: Do not name modules like native ones (i.e. rename pyarrow.io)
> ---------------------------------------------------------------------
>
>                 Key: ARROW-230
>                 URL: https://issues.apache.org/jira/browse/ARROW-230
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>            Reporter: Uwe L. Korn
>
> Although you can rename it in imports, still weird stuff can happen.
> E.g. if you re-run make in the build directory (only happens probably if you change pyarrow's CMakeLists.txt and do not call it via setup.py) you will get the following error:
> {noformat}
>     -- Found Python lib /usr/lib/x86_64-linux-gnu/libpython2.7.so
>     CMake Error at cmake_modules/FindNumPy.cmake:62 (message):
>       NumPy import failure:
>       Traceback (most recent call last):
>         File "<string>", line 1, in <module>
>         File "/home/uwe/.virtualenvs/pyarrow/local/lib/python2.7/site-packages/numpy/__init__.py", line 180, in <module>
>           from . import add_newdocs
>         File "/home/uwe/.virtualenvs/pyarrow/local/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
>           from numpy.lib import add_newdoc
>         File "/home/uwe/.virtualenvs/pyarrow/local/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
>           from .type_check import *
>         File "/home/uwe/.virtualenvs/pyarrow/local/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
>           import numpy.core.numeric as _nx
>         File "/home/uwe/.virtualenvs/pyarrow/local/lib/python2.7/site-packages/numpy/core/__init__.py", line 58, in <module>
>           from numpy.testing import Tester
>         File "/home/uwe/.virtualenvs/pyarrow/local/lib/python2.7/site-packages/numpy/testing/__init__.py", line 14, in <module>
>           from .utils import *
>         File "/home/uwe/.virtualenvs/pyarrow/local/lib/python2.7/site-packages/numpy/testing/utils.py", line 15, in <module>
>           from tempfile import mkdtemp
>         File "/usr/lib/python2.7/tempfile.py", line 32, in <module>
>           import io as _io
>       ImportError:
>       /home/uwe/Development/arrow/python/build/temp.linux-x86_64-2.7/./libpyarrow.so:
>       undefined symbol: pyarrow_ARRAY_API
>     Call Stack (most recent call first):
>       CMakeLists.txt:223 (find_package)
> {noformat}
> The actual error message here is confusing but the basic problem is that here the wrong io module is imported. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)