import pyarrow fails even when installed
I need to use the pyarrow package on QGIS 3 (using QGIS 3.32.2 'Lima') on Windows 11, and install it in OSGeo4W shell using pip:
pip install pyarrow,
which installs 13.0.0 by default as I'm writing this. The installed numpy of 1.25.2 satisfies the requirements of numpy>1.16.6 in pyarrow.
However, when trying to import pyarrow, I get the error message:
"""
Traceback (most recent call last):
File "C:\PROGRA~1\QGIS33~1.1\apps\Python39\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "", line 1, in
File "C:\PROGRA~1/QGIS33~1.1/apps/qgis/./python\qgis\utils.py", line 888, in _import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA~1\QGIS33~1.1\apps\Python39\lib\site-packages\pyarrow_init.py", line 65, in
import pyarrow.lib as _lib
File "C:\PROGRA~1/QGIS33~1.1/apps/qgis/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: DLL load failed while importing lib: The specified procedure could not be found.
"""
Some comments regarding variations I've tried:
* Upgrading pyarrow and numpy with pip from the original installation did not help:
pip install pyarrow upgrade (same w./ numpy),
nor did upgrading pip.
* The error is the same regardless of whether the entire package is imported:
import pyarrow,
or individual functions:
import pyarrow.parquet as pq
*
I don't think it's a python or pip issue, because about a dozen other packages are installed and used without any problem whatsoever
*
I've tried downgrading to earlier pyarrow versions (e.g., pip install pyarrow==12.0.0), and tried 12, 11, etc, but to no avail.
*
conda is widely recommended in python environments outside QGIS and I generally prefer it over pip, but I was not successful in installing it within OSGeo4W (using pip).
pip install conda
gives:
"""
ERROR: Could not find a version that satisfies the requirement conda (from versions: 3.0.6, 3.5.0, 3.7.0, 3.17.0, 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.7, 4.0.8, 4.0.9, 4.1.2, 4.1.6, 4.2.6, 4.2.7, 4.3.13, 4.3.16)
ERROR: No matching distribution found for conda
"""
Installing miniconda through git has also not worked:
pip install git
gives:
"""
ERROR: Could not find a version that satisfies the requirement git (from versions: none)
ERROR: No matching distribution found for git
"""
I would prefer to stay within the QGIS Linux - has anybody encountered similar issues and/or found a reasonably easy way to get pyarrow to work?
Knowing that it hasn't worked for others is also useful, so feedback other than solutions is welcome.