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

Hello all,

I have installed the last version of streamlit: 1.23.1.
the version of my python is 3.7.0
I used pip install streamlit and the installation is complete without error.

pip install streamlit==1.23.1
Collecting streamlit==1.23.1
Using cached streamlit-1.23.1-py2.py3-none-any.whl.metadata (7.4 kB)
Requirement already satisfied: altair<6,>=4.0 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (4.2.2)
Requirement already satisfied: blinker<2,>=1.0.0 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (1.6.3)
Requirement already satisfied: cachetools<6,>=4.0 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (5.3.3)
Requirement already satisfied: click<9,>=7.0 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (8.1.7)
Requirement already satisfied: importlib-metadata<7,>=1.4 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (6.7.0)
Requirement already satisfied: numpy<2,>=1 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (1.19.1)
Requirement already satisfied: packaging<24,>=14.1 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (23.2)
Requirement already satisfied: pandas<3,>=0.25 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (1.1.5)
Requirement already satisfied: pillow<10,>=6.2.0 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (7.1.2)
Requirement already satisfied: protobuf<5,>=3.20 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (3.20.3)
Requirement already satisfied: pyarrow>=4.0 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (12.0.1)
Requirement already satisfied: pympler<2,>=0.9 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (1.0.1)
Requirement already satisfied: python-dateutil<3,>=2 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (2.8.2)
Requirement already satisfied: requests<3,>=2.4 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (2.20.1)
Requirement already satisfied: rich<14,>=10.11.0 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (13.7.1)
Requirement already satisfied: tenacity<9,>=8.0.0 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (8.2.3)
Requirement already satisfied: toml<2 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (0.10.2)
Requirement already satisfied: typing-extensions<5,>=4.0.1 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (4.7.1)
Requirement already satisfied: tzlocal<5,>=1.1 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (2.0.0)
Requirement already satisfied: validators<1,>=0.2 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (0.20.0)
Requirement already satisfied: gitpython!=3.1.19,<4,>=3 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (3.1.43)
Requirement already satisfied: pydeck<1,>=0.1.dev5 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (0.8.1b0)
Requirement already satisfied: tornado<7,>=6.0.3 in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (6.2)
Requirement already satisfied: watchdog in c:\localapp\ei457\python37\lib\site-packages (from streamlit==1.23.1) (3.0.0)
Requirement already satisfied: entrypoints in c:\localapp\ei457\python37\lib\site-packages (from altair<6,>=4.0->streamlit==1.23.1) (0.4)
Requirement already satisfied: jinja2 in c:\localapp\ei457\python37\lib\site-packages (from altair<6,>=4.0->streamlit==1.23.1) (3.1.3)
Requirement already satisfied: jsonschema>=3.0 in c:\localapp\ei457\python37\lib\site-packages (from altair<6,>=4.0->streamlit==1.23.1) (4.17.3)
Requirement already satisfied: toolz in c:\localapp\ei457\python37\lib\site-packages (from altair<6,>=4.0->streamlit==1.23.1) (0.12.1)
Requirement already satisfied: colorama in c:\localapp\ei457\python37\lib\site-packages (from click<9,>=7.0->streamlit==1.23.1) (0.4.6)
Requirement already satisfied: gitdb<5,>=4.0.1 in c:\localapp\ei457\python37\lib\site-packages (from gitpython!=3.1.19,<4,>=3->streamlit==1.23.1) (4.0.11)
Requirement already satisfied: zipp>=0.5 in c:\localapp\ei457\python37\lib\site-packages (from importlib-metadata<7,>=1.4->streamlit==1.23.1) (3.15.0)
Requirement already satisfied: pytz>=2017.2 in c:\localapp\ei457\python37\lib\site-packages (from pandas<3,>=0.25->streamlit==1.23.1) (2020.1)
Requirement already satisfied: six>=1.5 in c:\localapp\ei457\python37\lib\site-packages (from python-dateutil<3,>=2->streamlit==1.23.1) (1.14.0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\localapp\ei457\python37\lib\site-packages (from requests<3,>=2.4->streamlit==1.23.1) (3.0.4)
Requirement already satisfied: idna<2.8,>=2.5 in c:\localapp\ei457\python37\lib\site-packages (from requests<3,>=2.4->streamlit==1.23.1) (2.7)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in c:\localapp\ei457\python37\lib\site-packages (from requests<3,>=2.4->streamlit==1.23.1) (1.24.3)
Requirement already satisfied: certifi>=2017.4.17 in c:\localapp\ei457\python37\lib\site-packages (from requests<3,>=2.4->streamlit==1.23.1) (2022.12.7)
Requirement already satisfied: markdown-it-py>=2.2.0 in c:\localapp\ei457\python37\lib\site-packages (from rich<14,>=10.11.0->streamlit==1.23.1) (2.2.0)
Requirement already satisfied: pygments<3.0.0,>=2.13.0 in c:\localapp\ei457\python37\lib\site-packages (from rich<14,>=10.11.0->streamlit==1.23.1) (2.17.2)
Requirement already satisfied: decorator>=3.4.0 in c:\localapp\ei457\python37\lib\site-packages (from validators<1,>=0.2->streamlit==1.23.1) (4.3.0)
Requirement already satisfied: smmap<6,>=3.0.1 in c:\localapp\ei457\python37\lib\site-packages (from gitdb<5,>=4.0.1->gitpython!=3.1.19,<4,>=3->streamlit==1.23.1) (5.0.1)
Requirement already satisfied: MarkupSafe>=2.0 in c:\localapp\ei457\python37\lib\site-packages (from jinja2->altair<6,>=4.0->streamlit==1.23.1) (2.1.3)
Requirement already satisfied: attrs>=17.4.0 in c:\localapp\ei457\python37\lib\site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit==1.23.1) (22.2.0)
Requirement already satisfied: importlib-resources>=1.4.0 in c:\localapp\ei457\python37\lib\site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit==1.23.1) (5.12.0)
Requirement already satisfied: pkgutil-resolve-name>=1.3.10 in c:\localapp\ei457\python37\lib\site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit==1.23.1) (1.3.10)
Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in c:\localapp\ei457\python37\lib\site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit==1.23.1) (0.19.3)
Requirement already satisfied: mdurl~=0.1 in c:\localapp\ei457\python37\lib\site-packages (from markdown-it-py>=2.2.0->rich<14,>=10.11.0->streamlit==1.23.1) (0.1.2)
Using cached streamlit-1.23.1-py2.py3-none-any.whl (8.9 MB)
Installing collected packages: streamlit
Attempting uninstall: streamlit
Found existing installation: streamlit 1.22.0
Uninstalling streamlit-1.22.0:
Successfully uninstalled streamlit-1.22.0
Successfully installed streamlit-1.23.1

I have created a page with link_button and page_link.
in PyCharm when I start to write st.p… or st.lin… it doesn’t suggest the both methods

When I run my WebApp, I get error message:
AttributeError: module ‘streamlit’ has no attribute ‘link_button’
or
AttributeError: module ‘streamlit’ has no attribute ‘page_link’

Here is the code of the page

import streamlit as st

st.set_page_config(
page_title=“Button Page”,
page_icon=“:wave:”,
)

with st.echo():
st.write(f"streamlit version: {st.version}")

st.write(f"Go to Yahoo: ")

st.link_button(“Go to google”, “http://www.google.com”)
st.page_link(“HomePage.py”, label=“Home”, icon=“:house:”)

I tried to install previous version 1.22.0 but I still get the same issue

What I missed?

I have updated python version to 3.8.3 then updated pip(19.2.3) and streamlit(1.33) and now everything is alright

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.