Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-18284: [Python][Docs] Add missing CMAKE_PREFIX_PATH to allow setup.py CMake invocations to find Arrow CMake package #14586

Merged
merged 1 commit into from Nov 8, 2022

Conversation

WillAyd
Copy link
Contributor

@WillAyd WillAyd commented Nov 4, 2022

Following along the build documentation CMake was unable to find the arrow installation when the documentation gets to the point of invoking setup.py. This should fix that and prevent errors like:

CMake Error at /home/willayd/mambaforge/envs/pyarrow-dev/share/cmake-3.24/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  By not providing "FindArrow.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Arrow", but
  CMake did not find one.

  Could not find a package configuration file provided by "Arrow" with any of
  the following names:

    ArrowConfig.cmake
    arrow-config.cmake

  Add the installation prefix of "Arrow" to CMAKE_PREFIX_PATH or set
  "Arrow_DIR" to a directory containing one of the above files.  If "Arrow"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  build/dist/lib/cmake/ArrowPython/ArrowPythonConfig.cmake:54 (find_dependency)
  CMakeLists.txt:239 (find_package

@github-actions
Copy link

github-actions bot commented Nov 4, 2022

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on JIRA? https://issues.apache.org/jira/browse/ARROW

Opening JIRAs ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename pull request title in the following format?

ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

@WillAyd WillAyd changed the title [Python] Update bulding docs to allow setup.py CMake invocations to find Arrow MINOR: [Python] Update bulding docs to allow setup.py CMake invocations to find Arrow Nov 4, 2022
@DK-DARKmatter
Copy link

Got the same question when using pip to install pyarrow. When will this be updated to the Pypi?

@kou kou changed the title MINOR: [Python] Update bulding docs to allow setup.py CMake invocations to find Arrow ARROW-18284: [Python] Update bulding docs to allow setup.py CMake invocations to find Arrow Nov 8, 2022
@github-actions
Copy link

github-actions bot commented Nov 8, 2022

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

@kou kou changed the title ARROW-18284: [Python] Update bulding docs to allow setup.py CMake invocations to find Arrow ARROW-18284: [Python][Docs] Add missing CMAKE_PREFIX_PATH to allow setup.py CMake invocations to find Arrow CMake package Nov 8, 2022
Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Good catch!

@kou kou merged commit 72d098b into apache:master Nov 8, 2022
@jorisvandenbossche
Copy link
Member

@WillAyd this is a correct fix for the docs if you are setting ARROW_HOME to a custom path (thanks for the catch!), but just to note since I see you are using mambaforge: if you set ARROW_HOME to the conda env prefix path (export ARROW_HOME=$CONDA_PREFIX), then you don't need to set CMAKE_PREFIX_PATH, because in that case Arrow will be installed in the conda env standard location, and cmake will find it automatically.

@jorisvandenbossche
Copy link
Member

Got the same question when using pip to install pyarrow. When will this be updated to the Pypi?

@DK-DARKmatter I don't think there is anything to "update" for the PyPI packages. If you want to install from source from PyPI, you as user are responsible for ensuring you also have Arrow C++ and have set up the correct env variables to ensure building pyarrow will find that.

@ursabot
Copy link

ursabot commented Nov 8, 2022

Benchmark runs are scheduled for baseline = 4ec92ec and contender = 72d098b. 72d098b is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Finished ⬇️0.27% ⬆️0.1%] test-mac-arm
[Finished ⬇️0.54% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.71% ⬆️0.07%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 72d098b6 ec2-t3-xlarge-us-east-2
[Finished] 72d098b6 test-mac-arm
[Finished] 72d098b6 ursa-i9-9960x
[Finished] 72d098b6 ursa-thinkcentre-m75q
[Finished] 4ec92ec1 ec2-t3-xlarge-us-east-2
[Finished] 4ec92ec1 test-mac-arm
[Finished] 4ec92ec1 ursa-i9-9960x
[Finished] 4ec92ec1 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@ursabot
Copy link

ursabot commented Nov 8, 2022

['Python', 'R'] benchmarks have high level of regressions.
ursa-i9-9960x

@WillAyd WillAyd deleted the python-build-fix branch November 8, 2022 16:20
@niranjan23d
Copy link

niranjan23d commented Nov 10, 2022

Got the same question when using pip to install pyarrow. When will this be updated to the Pypi?

@DK-DARKmatter I don't think there is anything to "update" for the PyPI packages. If you want to install from source from PyPI, you as user are responsible for ensuring you also have Arrow C++ and have set up the correct env variables to ensure building pyarrow will find that.

Hello, I am attempting to install Arrow C++ by "pip install pyarrow". I am getting the same error. What change do I need to do to fix it?
From where can I obtain this Arrow C++? (I am trying to install streamlit, and ended up installing about 10 gigs of stuff from visual studio)

@WillAyd
Copy link
Contributor Author

WillAyd commented Nov 10, 2022

@niranjan23d @DK-DARKmatter it sounds like you are trying to pip install pyarrow on a platform or version of Python where a wheel is not available. Unless you care to install from source your best bet is to look for a wheel or use conda/mamba

@niranjan23d
Copy link

I see. Thank you. I will try to install it onto python 3.10. I am trying to install it onto python 3.11

@niranjan23d
Copy link

I see. Thank you. I will try to install it onto python 3.10. I am trying to install it onto python 3.11

@niranjan23d @DK-DARKmatter it sounds like you are trying to pip install pyarrow on a platform or version of Python where a wheel is not available. Unless you care to install from source your best bet is to look for a wheel or use conda/mamba

That fix totally worked! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants