Skip to content

Commit 707fa6b

Browse files
kahemkerAlenkaFkahemkerkouraulcd
authored
GH-46080 [Python][Docs] Provide guidance for tzdata related issues if installing with pip (#46591)
Thanks for opening a pull request! ### Rationale for this change When installing pyarrow with pip, it is possible to experience a confusing time zone related error when writing files with datetime data. #46080 discusses the problem and a solution was eventually found. This change provides helpful information to other users who may experience the problem. ### What changes are included in this PR? Update to python installation instructions that offers guidance on how to handle tzdata related errors ### Are these changes tested? I was unable to build the documentation locally. I will use the github action to preview the documentation ### Are there any user-facing changes? No * GitHub Issue: #46080 Lead-authored-by: Kyle Hemker <k@hemker.us> Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com> Co-authored-by: kahemker <github@kylehemker.uk> Co-authored-by: kahemker <kyle.hemker@gmail.com> Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Co-authored-by: Raúl Cumplido <raulcumplido@gmail.com> Signed-off-by: AlenkaF <frim.alenka@gmail.com>
1 parent 775e400 commit 707fa6b

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

docs/source/python/install.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,21 @@ a custom path to the database from Python:
9898
>>> import pyarrow as pa
9999
>>> pa.set_timezone_db_path("custom_path")
100100
101+
You may encounter problems writing datetime data to an ORC file if you install
102+
pyarrow with pip. One possible solution to fix this problem:
103+
104+
1. Install tzdata with ``pip install tzdata``
105+
2. Set the environment variable ``TZDIR = path\to\.venv\Lib\site-packages\tzdata\``
106+
107+
You can find where ``tzdata`` is installed with the following python
108+
command:
109+
110+
.. code-block:: python
111+
112+
>>> import tzdata
113+
>>> print(tzdata.__file__)
114+
path\to\.venv\Lib\site-packages\tzdata\__init__.py
115+
101116
102117
.. _python-conda-differences:
103118

0 commit comments

Comments
 (0)