pytz appears to be a missing runtime dependency

Open Beginner friendly
#59 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
pandas, python

Research direction

Start by reproducing the fresh conda installation and import command from the issue, then inspect the package dependency metadata and blp/blp.py, where pytz is imported at line 12. Done means a fresh conda-forge installation includes the required runtime dependency and from blp import blp succeeds without manual installation.

Written by the indexing model from the issue text.

Description

Hello.

Description

After creating a fresh conda environment and installing blp from conda-forge, importing the package fails because pytz is not installed.

Environment

  • Windows 11
  • Python 3.13

Reproduction:

conda create -n bqltest python=3.13
conda activate bqltest
conda install -c conda-forge blp
python -c "from blp import blp"

Result:

Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    from blp import blp
  File "<myuserdir>\.conda\envs\bqltest\Lib\site-packages\blp\blp.py", line 12, in <module>
    import pytz
ModuleNotFoundError: No module named 'pytz'

Installing pytz manually resolves the issue.

Expected behaviour

A fresh installation of blp should install all required runtime dependencies such that from blp import blp should work

Possible cause

'pytz' used to be installed with pandas, but pandas has moved to zoneinfo in recent versions:
pandas 3.0 timezone changes - "As a result, pytz is no longer a required dependency of pandas. When installing pandas, pytz is therefore no longer included in your environment automatically. If you still need the package, install it directly or use the PyPI extra with pip install pandas[timezone]."

p.s thanks for this repo, its provides much utility to me. Appreciate the hard work

Dominant language
Python
Stars
147
Forks
35
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from matthewgilbert/blp

All issues in matthewgilbert/blp

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.