I\'m having a very weird problem with Python\'s pytz
: it seems to have an incomplete catalog of timezones on my system (MacOS X 10.8.5, system Python 2.7.5).
I cannot say why your installation of pytz is broken, but here's a possible fix:
pip show pytz
.open /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
(replacing my path with yours if different). This will launch a Finder window with your Python modules.I had a similar exception UnknownTimeZoneError: Can not find any timezone configuration
when i tried to run my app inside a docker container with the latest ubuntu images. It turned out that tzdata
was missing. Installing tzdata
package fixed it:
apt-get install -y tzdata
# Maybe you will need to reconfigure the timezone as well:
ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime
dpkg-reconfigure -f noninteractive tzdata
(Use sudo
if you have to)