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

Wes McKinney commented on ARROW-230:
------------------------------------

This problem is caused by setuptools because {{bin/cython}}, which has been 
munged by setuptools to import {{pkg_resources}} is being invoked in the same 
directory where the built shared libraries are being created. I don't think 
that renaming the module is the approriate fix, will require some tweaks to the 
way the Cython modules are being built in the CMakeLists.txt

> 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)

Reply via email to