Install & Compatibility
Where this runs
tested against v1.7.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 1.230s · 164.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 8.1s · import 1.166s · 157MB
169MB installed
● package 169MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Point
✓ from meteostat import Point
Used to define geographical coordinates for data retrieval.
Daily
✓ from meteostat import Daily
Used to fetch daily weather data.
Hourly
✓ from meteostat import Hourly
Used to fetch hourly weather data.
Stations
✓ from meteostat import Stations
Used to filter and access information about weather stations.
Parameter
✓ from meteostat import Parameter
Provides access to meteorological parameters for plotting or data selection.
This quickstart code demonstrates how to fetch and plot daily temperature data for a specific geographical point (Frankfurt, Germany) using the `meteostat` library. It involves defining a `Point`, specifying a date range, finding nearby stations, fetching and interpolating daily data, and then plotting the average, minimum, and maximum temperatures.
from datetime import date
import matplotlib.pyplot as plt
import meteostat as ms
# Specify location and time range for Frankfurt, Germany
POINT = ms.Point(50.1155, 8.6842, 113)
START = date(2018, 1, 1)
END = date(2018, 12, 31)
# Get nearby weather stations
stations = ms.stations.nearby(POINT, limit=4)
# Get daily data & perform interpolation
ts = ms.daily(stations, START, END)
df = ms.interpolate(ts, POINT).fetch()
# Plot line chart including average, minimum and maximum temperature
df.plot(y=[ms.Parameter.TEMP, ms.Parameter.TMIN, ms.Parameter.TMAX])
plt.title('2018 Temperature Data for Frankfurt, Germany')
plt.xlabel('Date')
plt.ylabel('Temperature (°C)')
plt.show()
Debug
Known issues
breakingMeteostat 2.0.0 introduced breaking changes, including performance improvements and a more consistent API experience. Code written for versions prior to 2.0.0 may require adjustments.fixRefer to the official Meteostat Python library documentation for migration guides and updated API usage for versions 2.0.0 and above.
affects: <2.0.0
deprecatedMeteostat shut down version 1 of its JSON API on May 1, 2021. While this primarily affects direct API users, older versions of the Python library might have relied on aspects of API v1, leading to unexpected behavior if not updated.fixEnsure you are using the latest stable version of the `meteostat` Python library (2.0.0 or newer) which is designed to interact with API v2 and the bulk data interface.
affects: Potentially library versions released around or before March 2021 that interacted with API v1.
gotchaBy default, Meteostat caches data dumps on your local drive in `~/.meteostat/cache`. If you are short on storage, monitor the cache size or specify a different `cache_dir` parameter.fixTo change the cache directory, set the `cache_dir` parameter when initializing any of the library's classes (e.g., `ms.Point(..., cache_dir='/path/to/new/cache')`).
affects: All versions
gotchaMeteostat uses the metric system (e.g., °C for temperature, mm for precipitation, km/h for wind speed) and UTC for time. Ensure your data processing and visualizations account for these default units and timezones.fixConvert units or adjust for timezones explicitly in your code if different systems are required. The documentation provides details on the units used.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'meteostat'
The 'meteostat' package is not installed in the Python environment being used.
fixInstall the package using pip: `pip install meteostat`
AttributeError: 'Series' object has no attribute 'fetch'
This error typically occurs when attempting to call `.fetch()` on a pandas Series containing `meteostat.Daily` or `meteostat.Hourly` objects, instead of calling `.fetch()` on each individual `TimeSeries` object or combining them appropriately.
fixIterate through the Series and call `.fetch()` on each element, then concatenate the results, or use a method like `meteostat.merge` to combine `TimeSeries` objects before fetching. For example, instead of `data = df.apply(lambda x: Daily(x['point'], start, end), axis=1); data = data.fetch()`, you might need to do `data_list = [ms.Daily(row['point'], start, end).fetch() for _, row in df.iterrows()]; df_combined = pd.concat(data_list)`.
AttributeError: 'NoneType' object has no attribute 'name'
This error often indicates that a `meteostat` method, such as `stations.nearby()` or `stations.meta()`, returned `None` (because no matching station or data was found for the given parameters), and subsequently, an attempt was made to access an attribute (like 'name', 'id', 'lat', etc.) of this `None` object.
fixAlways check if the returned object is `None` before attempting to access its attributes. For example: `station = ms.stations.meta('nonexistent_id'); if station: print(station.name)` AttributeError: 'Stations' object has no attribute 'nearby'
This error can occur if you're trying to call `nearby` on an incorrectly imported or instantiated `Stations` object, or if there was a version mismatch where the `nearby` method was expected to be accessed differently.
fixEnsure you are using the officially documented way to access station methods, which is typically `import meteostat as ms; stations = ms.stations.nearby(point)`. The `ms.stations` object is the correct entry point for station-related queries in current versions.
Upgrade
Version history
2.1.4latest on PyPI · released Mar 21, 2026
Audit
Dependencies
pandasrequiredMeteostat is built on top of Pandas for data analysis and returns data in Pandas DataFrames.
pyarrowrequiredRequired for efficient data handling, automatically installed as a dependency.