We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
minimum pyarrow version enforced even if pandas is installed
The error we are facing in an environment says:
```python
RuntimeError: The pyarrow package must be version 11.0.0 or greater. Found version 6.0.1
```

And is caused by these lines:
https://github.com/altair-viz/altair/blob/main/altair/utils/core.py#L591-L592

```python
    # if data is specified and type is not, infer type from data
    if "type" not in attrs:
        if pyarrow_available() and data is not None and isinstance(data, DataFrameLike):
            ...

        elif isinstance(data, pd.DataFrame):
            # Fallback if pyarrow is not installed or if pandas is older than 1.5
```
In that particular environment pandas is installed by default and we are not able to upgrade pyarrow. 

Now the altair specifications errors as the code never tries the pandas approach as it has found a pyarrow version that is too old. 


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `altair/utils/_importers.py`
Content:
```
1 from types import ModuleType
2 from packaging.version import Version
3 from importlib.metadata import version as importlib_version
4 
5 
6 def import_vegafusion() -> ModuleType:
7     min_version = "1.5.0"
8     try:
9         version = importlib_version("vegafusion")
10         embed_version = importlib_version("vegafusion-python-embed")
11         if version != embed_version or Version(version) < Version(min_version):
12             raise RuntimeError(
13                 "The versions of the vegafusion and vegafusion-python-embed packages must match\n"
14                 f"and must be version {min_version} or greater.\n"
15                 f"Found:\n"
16                 f" - vegafusion=={version}\n"
17                 f" - vegafusion-python-embed=={embed_version}\n"
18             )
19         import vegafusion as vf  # type: ignore
20 
21         return vf
22     except ImportError as err:
23         raise ImportError(
24             'The "vegafusion" data transformer and chart.transformed_data feature requires\n'
25             f"version {min_version} or greater of the 'vegafusion-python-embed' and 'vegafusion' packages.\n"
26             "These can be installed with pip using:\n"
27             f'    pip install "vegafusion[embed]>={min_version}"\n'
28             "Or with conda using:\n"
29             f'    conda install -c conda-forge "vegafusion-python-embed>={min_version}" '
30             f'"vegafusion>={min_version}"\n\n'
31             f"ImportError: {err.args[0]}"
32         ) from err
33 
34 
35 def import_vl_convert() -> ModuleType:
36     min_version = "1.3.0"
37     try:
38         version = importlib_version("vl-convert-python")
39         if Version(version) < Version(min_version):
40             raise RuntimeError(
41                 f"The vl-convert-python package must be version {min_version} or greater. "
42                 f"Found version {version}"
43             )
44         import vl_convert as vlc
45 
46         return vlc
47     except ImportError as err:
48         raise ImportError(
49             f"The vl-convert Vega-Lite compiler and file export feature requires\n"
50             f"version {min_version} or greater of the 'vl-convert-python' package. \n"
51             f"This can be installed with pip using:\n"
52             f'   pip install "vl-convert-python>={min_version}"\n'
53             "or conda:\n"
54             f'   conda install -c conda-forge "vl-convert-python>={min_version}"\n\n'
55             f"ImportError: {err.args[0]}"
56         ) from err
57 
58 
59 def vl_version_for_vl_convert() -> str:
60     from ..vegalite import SCHEMA_VERSION
61 
62     # Compute VlConvert's vl_version string (of the form 'v5_2')
63     # from SCHEMA_VERSION (of the form 'v5.2.0')
64     return "_".join(SCHEMA_VERSION.split(".")[:2])
65 
66 
67 def import_pyarrow_interchange() -> ModuleType:
68     min_version = "11.0.0"
69     try:
70         version = importlib_version("pyarrow")
71 
72         if Version(version) < Version(min_version):
73             raise RuntimeError(
74                 f"The pyarrow package must be version {min_version} or greater. "
75                 f"Found version {version}"
76             )
77         import pyarrow.interchange as pi
78 
79         return pi
80     except ImportError as err:
81         raise ImportError(
82             f"Usage of the DataFrame Interchange Protocol requires\n"
83             f"version {min_version} or greater of the pyarrow package. \n"
84             f"This can be installed with pip using:\n"
85             f'   pip install "pyarrow>={min_version}"\n'
86             "or conda:\n"
87             f'   conda install -c conda-forge "pyarrow>={min_version}"\n\n'
88             f"ImportError: {err.args[0]}"
89         ) from err
90 
91 
92 def pyarrow_available() -> bool:
93     try:
94         import_pyarrow_interchange()
95         return True
96     except ImportError:
97         return False
98
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/altair/utils/_importers.py b/altair/utils/_importers.py
--- a/altair/utils/_importers.py
+++ b/altair/utils/_importers.py
@@ -93,5 +93,5 @@
     try:
         import_pyarrow_interchange()
         return True
-    except ImportError:
+    except (ImportError, RuntimeError):
         return False

{"golden_diff": "diff --git a/altair/utils/_importers.py b/altair/utils/_importers.py\n--- a/altair/utils/_importers.py\n+++ b/altair/utils/_importers.py\n@@ -93,5 +93,5 @@\n     try:\n         import_pyarrow_interchange()\n         return True\n-    except ImportError:\n+    except (ImportError, RuntimeError):\n         return False\n", "issue": "minimum pyarrow version enforced even if pandas is installed\nThe error we are facing in an environment says:\r\n```python\r\nRuntimeError: The pyarrow package must be version 11.0.0 or greater. Found version 6.0.1\r\n```\r\n\r\nAnd is caused by these lines:\r\nhttps://github.com/altair-viz/altair/blob/main/altair/utils/core.py#L591-L592\r\n\r\n```python\r\n    # if data is specified and type is not, infer type from data\r\n    if \"type\" not in attrs:\r\n        if pyarrow_available() and data is not None and isinstance(data, DataFrameLike):\r\n            ...\r\n\r\n        elif isinstance(data, pd.DataFrame):\r\n            # Fallback if pyarrow is not installed or if pandas is older than 1.5\r\n```\r\nIn that particular environment pandas is installed by default and we are not able to upgrade pyarrow. \r\n\r\nNow the altair specifications errors as the code never tries the pandas approach as it has found a pyarrow version that is too old. \r\n\n", "before_files": [{"content": "from types import ModuleType\nfrom packaging.version import Version\nfrom importlib.metadata import version as importlib_version\n\n\ndef import_vegafusion() -> ModuleType:\n    min_version = \"1.5.0\"\n    try:\n        version = importlib_version(\"vegafusion\")\n        embed_version = importlib_version(\"vegafusion-python-embed\")\n        if version != embed_version or Version(version) < Version(min_version):\n            raise RuntimeError(\n                \"The versions of the vegafusion and vegafusion-python-embed packages must match\\n\"\n                f\"and must be version {min_version} or greater.\\n\"\n                f\"Found:\\n\"\n                f\" - vegafusion=={version}\\n\"\n                f\" - vegafusion-python-embed=={embed_version}\\n\"\n            )\n        import vegafusion as vf  # type: ignore\n\n        return vf\n    except ImportError as err:\n        raise ImportError(\n            'The \"vegafusion\" data transformer and chart.transformed_data feature requires\\n'\n            f\"version {min_version} or greater of the 'vegafusion-python-embed' and 'vegafusion' packages.\\n\"\n            \"These can be installed with pip using:\\n\"\n            f'    pip install \"vegafusion[embed]>={min_version}\"\\n'\n            \"Or with conda using:\\n\"\n            f'    conda install -c conda-forge \"vegafusion-python-embed>={min_version}\" '\n            f'\"vegafusion>={min_version}\"\\n\\n'\n            f\"ImportError: {err.args[0]}\"\n        ) from err\n\n\ndef import_vl_convert() -> ModuleType:\n    min_version = \"1.3.0\"\n    try:\n        version = importlib_version(\"vl-convert-python\")\n        if Version(version) < Version(min_version):\n            raise RuntimeError(\n                f\"The vl-convert-python package must be version {min_version} or greater. \"\n                f\"Found version {version}\"\n            )\n        import vl_convert as vlc\n\n        return vlc\n    except ImportError as err:\n        raise ImportError(\n            f\"The vl-convert Vega-Lite compiler and file export feature requires\\n\"\n            f\"version {min_version} or greater of the 'vl-convert-python' package. \\n\"\n            f\"This can be installed with pip using:\\n\"\n            f'   pip install \"vl-convert-python>={min_version}\"\\n'\n            \"or conda:\\n\"\n            f'   conda install -c conda-forge \"vl-convert-python>={min_version}\"\\n\\n'\n            f\"ImportError: {err.args[0]}\"\n        ) from err\n\n\ndef vl_version_for_vl_convert() -> str:\n    from ..vegalite import SCHEMA_VERSION\n\n    # Compute VlConvert's vl_version string (of the form 'v5_2')\n    # from SCHEMA_VERSION (of the form 'v5.2.0')\n    return \"_\".join(SCHEMA_VERSION.split(\".\")[:2])\n\n\ndef import_pyarrow_interchange() -> ModuleType:\n    min_version = \"11.0.0\"\n    try:\n        version = importlib_version(\"pyarrow\")\n\n        if Version(version) < Version(min_version):\n            raise RuntimeError(\n                f\"The pyarrow package must be version {min_version} or greater. \"\n                f\"Found version {version}\"\n            )\n        import pyarrow.interchange as pi\n\n        return pi\n    except ImportError as err:\n        raise ImportError(\n            f\"Usage of the DataFrame Interchange Protocol requires\\n\"\n            f\"version {min_version} or greater of the pyarrow package. \\n\"\n            f\"This can be installed with pip using:\\n\"\n            f'   pip install \"pyarrow>={min_version}\"\\n'\n            \"or conda:\\n\"\n            f'   conda install -c conda-forge \"pyarrow>={min_version}\"\\n\\n'\n            f\"ImportError: {err.args[0]}\"\n        ) from err\n\n\ndef pyarrow_available() -> bool:\n    try:\n        import_pyarrow_interchange()\n        return True\n    except ImportError:\n        return False\n", "path": "altair/utils/_importers.py"}], "after_files": [{"content": "from types import ModuleType\nfrom packaging.version import Version\nfrom importlib.metadata import version as importlib_version\n\n\ndef import_vegafusion() -> ModuleType:\n    min_version = \"1.5.0\"\n    try:\n        version = importlib_version(\"vegafusion\")\n        embed_version = importlib_version(\"vegafusion-python-embed\")\n        if version != embed_version or Version(version) < Version(min_version):\n            raise RuntimeError(\n                \"The versions of the vegafusion and vegafusion-python-embed packages must match\\n\"\n                f\"and must be version {min_version} or greater.\\n\"\n                f\"Found:\\n\"\n                f\" - vegafusion=={version}\\n\"\n                f\" - vegafusion-python-embed=={embed_version}\\n\"\n            )\n        import vegafusion as vf  # type: ignore\n\n        return vf\n    except ImportError as err:\n        raise ImportError(\n            'The \"vegafusion\" data transformer and chart.transformed_data feature requires\\n'\n            f\"version {min_version} or greater of the 'vegafusion-python-embed' and 'vegafusion' packages.\\n\"\n            \"These can be installed with pip using:\\n\"\n            f'    pip install \"vegafusion[embed]>={min_version}\"\\n'\n            \"Or with conda using:\\n\"\n            f'    conda install -c conda-forge \"vegafusion-python-embed>={min_version}\" '\n            f'\"vegafusion>={min_version}\"\\n\\n'\n            f\"ImportError: {err.args[0]}\"\n        ) from err\n\n\ndef import_vl_convert() -> ModuleType:\n    min_version = \"1.3.0\"\n    try:\n        version = importlib_version(\"vl-convert-python\")\n        if Version(version) < Version(min_version):\n            raise RuntimeError(\n                f\"The vl-convert-python package must be version {min_version} or greater. \"\n                f\"Found version {version}\"\n            )\n        import vl_convert as vlc\n\n        return vlc\n    except ImportError as err:\n        raise ImportError(\n            f\"The vl-convert Vega-Lite compiler and file export feature requires\\n\"\n            f\"version {min_version} or greater of the 'vl-convert-python' package. \\n\"\n            f\"This can be installed with pip using:\\n\"\n            f'   pip install \"vl-convert-python>={min_version}\"\\n'\n            \"or conda:\\n\"\n            f'   conda install -c conda-forge \"vl-convert-python>={min_version}\"\\n\\n'\n            f\"ImportError: {err.args[0]}\"\n        ) from err\n\n\ndef vl_version_for_vl_convert() -> str:\n    from ..vegalite import SCHEMA_VERSION\n\n    # Compute VlConvert's vl_version string (of the form 'v5_2')\n    # from SCHEMA_VERSION (of the form 'v5.2.0')\n    return \"_\".join(SCHEMA_VERSION.split(\".\")[:2])\n\n\ndef import_pyarrow_interchange() -> ModuleType:\n    min_version = \"11.0.0\"\n    try:\n        version = importlib_version(\"pyarrow\")\n\n        if Version(version) < Version(min_version):\n            raise RuntimeError(\n                f\"The pyarrow package must be version {min_version} or greater. \"\n                f\"Found version {version}\"\n            )\n        import pyarrow.interchange as pi\n\n        return pi\n    except ImportError as err:\n        raise ImportError(\n            f\"Usage of the DataFrame Interchange Protocol requires\\n\"\n            f\"version {min_version} or greater of the pyarrow package. \\n\"\n            f\"This can be installed with pip using:\\n\"\n            f'   pip install \"pyarrow>={min_version}\"\\n'\n            \"or conda:\\n\"\n            f'   conda install -c conda-forge \"pyarrow>={min_version}\"\\n\\n'\n            f\"ImportError: {err.args[0]}\"\n        ) from err\n\n\ndef pyarrow_available() -> bool:\n    try:\n        import_pyarrow_interchange()\n        return True\n    except (ImportError, RuntimeError):\n        return False\n", "path": "altair/utils/_importers.py"}]}