Skip to content

RokoPecotic/PyQt5_Weather_API_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyQt5 Weather API App

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.

Qt Plugin Configuration (Windows)

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_PATH
  • QT_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.

API Key and Tokens

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.

Features

  • City search
  • Temperature display (°C)
  • Weather description and emoji icons
  • Basic error handling
  • Desktop GUI (PyQt5)

Tech Stack

  • Python
  • PyQt5
  • requests
  • OpenWeather API

Screenshot

App Preview

About

PyQt5 desktop application that displays real-time weather data using the OpenWeather API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages