A simple desktop weather application built with Python, PyQt5, and the OpenWeather API. The app allows users to search for a city and display current weather information.
On some Windows systems, PyQt5 may fail to automatically locate the required Qt platform plugins (especially qwindows.dll).
In this project, the issue was most likely caused by special (Unicode) characters in the user directory path (e.g. non-ASCII characters such as č, ć, š), which can lead to problems with Qt plugin discovery on Windows.
Due to this, Qt attempted to load platform plugins from incorrect locations instead of the virtual environment directory.
To ensure proper initialization, the Qt plugin paths must be configured manually when running the application.
The following environment variables are set before execution:
QT_QPA_PLATFORM_PLUGIN_PATHQT_PLUGIN_PATH
These variables point to the PyQt5 plugin directories inside the virtual environment and allow Qt to load the required platform plugins correctly.
A helper script (run.ps1) is provided to automatically configure these variables and start the application.
This application uses the OpenWeather API to retrieve weather data.
For simplicity and local development purposes, the API key is loaded from an environment variable:
OPENWEATHER_API_KEY
Before running the application, the user must set this variable on their system.
- City search
- Temperature display (°C)
- Weather description and emoji icons
- Basic error handling
- Desktop GUI (PyQt5)
- Python
- PyQt5
- requests
- OpenWeather API
