Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-7041

[Python] PythonLibs setting found by CMake uses wrong version of Python on macOS

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Python
    • Labels:
      None

      Description

      I'm trying to build the Python library and run its tests, so to do that I need to first build the C++ library. I'm going through the Python Development Guide part of the docs. When invoking CMake to build the C++ library, it claims to have found PythonLibs here:

      – Found PythonLibs: /usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/lib/libpython3.7m.dylib

      Just by looking at the whole path, it doesn't look like a promising location. And indeed, there's no libpython3.7*.dylib file in the Python 2.7 install directory. So the C++ build fails.

      I'm on macOS 10.14.6. I have Python 2.7 and 3.7 both installed via Homebrew. (There is a libpython3.7*.dylib file in the Python 3.7 install of Homebrew.) For the Python build dependencies, I have a Python 3.7 venv active and they are installed there via pip. This happens with -DARROW_PYTHON=ON.

      This definitely looks like whatever piece of CMake code that is trying to find PythonLibs is grabbing the first directory it finds, and appending a path to the dylib without looking if it exists. However, I don't know much of anything about CMake. Any suggestion for a fix or at least a workaround to point CMake to the PythonLibs directory that would make more sense?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              chrish42 Christian Hudon
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: