AttributeError: module 'streamlit' has no attribute 'metric'

I am using streamlit ‘metric’ module in my web app but it results in a attribute error.
like this one:
AttributeError: module ‘streamlit’ has no attribute ‘metric’

I am using :
streamlit version : 0.62.0
windows : 32 bit os
python version : 3.7.1

My code snip:

def weather_forcast():

    obs = mgr.weather_at_place(location)
    weather =

    temp = weather.temperature(unit=units)['temp']

    st.metric(label='Temperature', value=temp)

    print(f"Temperature: {round(temp)}{sign}C")
    cloud = weather.clouds
    print(f"Clouds Coverage: {cloud}%")
    wind = weather.wind()['speed']
    print(f"Wind Speed: {wind}m/s")

Any help would be appreciated.

Hi @Akash_Das

Welcome to the forum! :slight_smile:

st.metric() was not released until version 0.87.0, so would recommend upgrading to Streamlit version >= 0.87.0, the latest is 0.88.0. You can find the changelog here.