edponce commented on issue #10222: URL: https://github.com/apache/arrow/issues/10222#issuecomment-853375339
@Atharex The error usually occurs if you run the Python interpreter from `ARROW_ROOT/python` directory because the `import pyarrow` statement will try to use the local directory of `ARROW_ROOT/python/pyarrow` path instead of the installed `pyarrow` wheel. Also, I noticed from the previous threads that ARROW_HOME is used somewhat incorrectly. ARROW_HOME should point to the installation directory of Arrow C++. Use ARROW_ROOT for the top directory of the repo. Putting all of this together, here are steps you can follow to successfully build/install Arrow 1.0.1 system-wide: ``` export ARROW_HOME=/usr/local/lib/arrow export ARROW_ROOT=/root/home/arrow # Download Apache Arrow repo git clone https://github.com/apache/arrow.git "$ARROW_ROOT" cd "$ARROW_ROOT" git checkout apache-arrow-1.0.1 # (Optional) Update submodules for unit tests git submodule update --init export PARQUET_TEST_DATA="$ARROW_ROOT/cpp/submodules/parquet-testing/data" export ARROW_TEST_DATA="$ARROW_ROOT/testing/data" # Download Arrow C++ third party build dependencies cd "$ARROW_ROOT/cpp/thirdparty" # Fix Boost URL issue sed -i 's...@dl.bintray.com/ursalabs/arrow-bo...@github.com/ursa-labs/thirdparty/releases/download/latest@' versions.txt bash download_dependencies.sh > environ.sh source environ.sh # Apache Arrow C++ build export ARROW_CPP_BUILD="$ARROW_ROOT/cpp/build" mkdir -p "$ARROW_CPP_BUILD" cd "$ARROW_CPP_BUILD" cmake \ -DCMAKE_BUILD_TYPE=release \ -DCMAKE_INSTALL_PREFIX="$ARROW_HOME" \ -DCMAKE_INSTALL_LIBDIR=lib \ -DARROW_FLIGHT=ON \ -DARROW_ORC=ON \ -DARROW_WITH_BZ2=ON \ -DARROW_WITH_ZLIB=ON \ -DARROW_WITH_ZSTD=ON \ -DARROW_WITH_LZ4=ON \ -DARROW_WITH_SNAPPY=ON \ -DARROW_WITH_BROTLI=ON \ -DARROW_PARQUET=ON \ -DARROW_PYTHON=ON \ -DARROW_PLASMA=ON \ -DARROW_CUDA=ON \ -DARROW_DEPENDENCY_SOURCE=BUNDLED \ .. make -j 24 make install # Set up Python requirements and environment cd "$ARROW_ROOT/python" export PYARROW_BUILD_TYPE=release export PYARROW_WITH_FLIGHT=1 export PYARROW_WITH_ORC=1 export PYARROW_WITH_PARQUET=1 export PYARROW_WITH_PLASMA=1 export PYARROW_WITH_CUDA=1 pip3 install -r requirements-wheel-build.txt python3 setup.py build_ext -j 24 --bundle-arrow-cpp bdist_wheel pip3 install "$ARROW_ROOT"/python/dist/pyarrow*.whl ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org