pythonpandaspython-3.8zoneinfo

Using Pandas 2.0 with Python 3.8 without Zoneinfo


I am running some code using Python 3.8. As it is for a scientific experiment that has already been run in this configuration before, I cannot currently update to a newer version of Python. I am using pandas, which needs zoneinfo, which is only part of Python 3.9 and up. I know that it should be possible to somehow still use pandas 2.0.2, because I have the code installed somewhere else, where the missing zoneinfo doesn't cause any problems. I just don't know how. Can anyone help me get pandas to work?

I have tried installing backports but obviously then I would need to redirect pandas to use backports instead of zoneinfo, and I don't know how I can do that in an easy way.


Solution

  • The answer was making sure pytz was up to date!