-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
Describe the bug, including details regarding any error messages, version, and platform.
Summary
I would like to migrate a project from conda to uv and it appears that when uv builds the environment, pyarrow can no longer write orc files that include datetimes with timezones. I have confirmed the same problem exists even if you install pyarrow and polars with pip which makes me believe this related to the distributed wheels on Windows. I have run pyarrow.util.download_tzdata_on_windows(). The files downloaded successfully.
I created a minimum reproducible example here.
Steps to recreate the problem.
- Clone the repo
- Run
uv syncto install polars and pyarrow using pyproject.toml - Run
uv run main.py
The error message is
Traceback (most recent call last):
File "W:\code\test_pyarrow\main.py", line 21, in <module>
main()
File "W:\code\test_pyarrow\main.py", line 17, in main
writer.write(df.to_arrow().cast(table_schema))
File "W:\code\test_pyarrow\.venv\Lib\site-packages\pyarrow\orc.py", line 289, in write
self.writer.write(table)
File "pyarrow\\_orc.pyx", line 439, in pyarrow._orc.ORCWriter.write
File "pyarrow\\error.pxi", line 92, in pyarrow.lib.check_status
pyarrow.lib.ArrowException: Unknown error: Time zone file /usr/share/zoneinfo/GMT does not exist. Please install IANA time zone database and set TZDIR env.
You can build the working conda environment by following these steps (again starting from the minimum reproducible example)
conda env create -f environment.ymlconda activate test_pyarrow_condapython main.py
The code will terminate successfully and the test.orc.snappy file will exist in the directory.
Platform
Windows 10 Pro, Version 10.0.19045, 64-bit
Windows 11 Pro, 24H2, 26100.3775
Version
pyarrow-19.0.1
polars-1.26.0
uv 0.6.12 (astral-sh/uv@e4e0383 2025-04-02)
Python version
Python 3.12.9
Component(s)
Python