Streamlit
Streamlitとは、オープンソースのPythonライブラリの中にあるwebアプリケーション開発のためののフレームワークです。
HTML CSSを書く必要がなくPythonのプログラミングだけでwebアプリケーションが作成できます。
Streamlitインストール
Streamlit documentation(https://docs.streamlit.io/)に従ってインストールします。
事前準備
公式ドキュメントより以下の順で行います。
何らかのエディターをインストールしておく。(ATOM や Visual studio Codeなど)
os対応のpythonインストール
インストーラーをダウンロードし実行python-3.10.4-amd64.exe (PATHを通しておく)
次にPowerShellからstreamlitをインストールする。
streamLit インストール
Windows Power Shellより、
pip install streamlit入力
インストールが完了したらインストール後テストを行う
pip hello
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
新しいクロスプラットフォームの PowerShell をお試しください https://aka.ms/pscore6
PS C:\Users\omo> pip install streamlit
Collecting streamlit
Using cached streamlit-1.8.1-py2.py3-none-any.whl (10.1 MB)
Collecting python-dateutil
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pydeck>=0.1.dev5
Using cached pydeck-0.7.1-py2.py3-none-any.whl (4.3 MB)
Collecting tornado>=5.0
Using cached tornado-6.1.tar.gz (497 kB)
Preparing metadata (setup.py) ... done
Collecting pyarrow
Using cached pyarrow-7.0.0-cp310-cp310-win_amd64.whl (16.1 MB)
Collecting cachetools>=4.0
Using cached cachetools-5.0.0-py3-none-any.whl (9.1 kB)
Collecting packaging
Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting gitpython!=3.1.19
Using cached GitPython-3.1.27-py3-none-any.whl (181 kB)
Collecting protobuf!=3.11,>=3.6.0
Using cached protobuf-3.20.1-cp310-cp310-win_amd64.whl (903 kB)
Collecting click<8.1,>=7.0
Using cached click-8.0.4-py3-none-any.whl (97 kB)
Collecting semver
Using cached semver-2.13.0-py2.py3-none-any.whl (12 kB)
Collecting pympler>=0.9
Using cached Pympler-1.0.1-py3-none-any.whl (164 kB)
Collecting requests
Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting tzlocal
Using cached tzlocal-4.2-py3-none-any.whl (19 kB)
Collecting attrs
Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting blinker
Using cached blinker-1.4.tar.gz (111 kB)
Preparing metadata (setup.py) ... done
Collecting numpy
Using cached numpy-1.22.3-cp310-cp310-win_amd64.whl (14.7 MB)
Collecting altair>=3.2.0
Using cached altair-4.2.0-py3-none-any.whl (812 kB)
Collecting validators
Using cached validators-0.18.2-py3-none-any.whl (19 kB)
Collecting toml
Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting importlib-metadata>=1.4
Using cached importlib_metadata-4.11.3-py3-none-any.whl (18 kB)
Collecting watchdog
Using cached watchdog-2.1.7-py3-none-win_amd64.whl (76 kB)
Collecting pandas>=0.21.0
Using cached pandas-1.4.2-cp310-cp310-win_amd64.whl (10.6 MB)
Collecting pillow>=6.2.0
Using cached Pillow-9.1.0-cp310-cp310-win_amd64.whl (3.3 MB)
Collecting entrypoints
Using cached entrypoints-0.4-py3-none-any.whl (5.3 kB)
Collecting jsonschema>=3.0
Using cached jsonschema-4.4.0-py3-none-any.whl (72 kB)
Collecting jinja2
Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting toolz
Using cached toolz-0.11.2-py3-none-any.whl (55 kB)
Collecting colorama
Using cached colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting gitdb<5,>=4.0.1
Using cached gitdb-4.0.9-py3-none-any.whl (63 kB)
Collecting zipp>=0.5
Using cached zipp-3.8.0-py3-none-any.whl (5.4 kB)
Collecting pytz>=2020.1
Using cached pytz-2022.1-py2.py3-none-any.whl (503 kB)
Collecting ipykernel>=5.1.2
Using cached ipykernel-6.13.0-py3-none-any.whl (131 kB)
Collecting traitlets>=4.3.2
Using cached traitlets-5.1.1-py3-none-any.whl (102 kB)
Collecting ipywidgets>=7.0.0
Using cached ipywidgets-7.7.0-py2.py3-none-any.whl (123 kB)
Collecting six>=1.5
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
Using cached pyparsing-3.0.8-py3-none-any.whl (98 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
Collecting charset-normalizer~=2.0.0
Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting idna<4,>=2.5
Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting tzdata
Using cached tzdata-2022.1-py2.py3-none-any.whl (339 kB)
Collecting pytz-deprecation-shim
Using cached pytz_deprecation_shim-0.1.0.post0-py2.py3-none-any.whl (15 kB)
Collecting decorator>=3.4.0
Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting smmap<6,>=3.0.1
Using cached smmap-5.0.0-py3-none-any.whl (24 kB)
Collecting matplotlib-inline>=0.1
Using cached matplotlib_inline-0.1.3-py3-none-any.whl (8.2 kB)
Collecting jupyter-client>=6.1.12
Using cached jupyter_client-7.3.0-py3-none-any.whl (130 kB)
Collecting debugpy>=1.0
Using cached debugpy-1.6.0-cp310-cp310-win_amd64.whl (4.3 MB)
Collecting psutil
Using cached psutil-5.9.0-cp310-cp310-win_amd64.whl (245 kB)
Collecting ipython>=7.23.1
Using cached ipython-8.3.0-py3-none-any.whl (750 kB)
Collecting nest-asyncio
Using cached nest_asyncio-1.5.5-py3-none-any.whl (5.2 kB)
Collecting jupyterlab-widgets>=1.0.0
Using cached jupyterlab_widgets-1.1.0-py3-none-any.whl (245 kB)
Collecting widgetsnbextension~=3.6.0
Using cached widgetsnbextension-3.6.0-py2.py3-none-any.whl (1.6 MB)
Collecting ipython-genutils~=0.2.0
Using cached ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)
Collecting nbformat>=4.2.0
Using cached nbformat-5.3.0-py3-none-any.whl (73 kB)
Collecting MarkupSafe>=2.0
Using cached MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl (17 kB)
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
Using cached pyrsistent-0.18.1-cp310-cp310-win_amd64.whl (61 kB)
Collecting backcall
Using cached backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting stack-data
Using cached stack_data-0.2.0-py3-none-any.whl (21 kB)
Collecting prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0
Using cached prompt_toolkit-3.0.29-py3-none-any.whl (381 kB)
Collecting pygments>=2.4.0
Using cached Pygments-2.12.0-py3-none-any.whl (1.1 MB)
Requirement already satisfied: setuptools>=18.5 in c:\users\omo\appdata\local\programs\python\python310\lib\site-packages (from ipython>=7.23.1->ipykernel>=5.1.2->pydeck>=0.1.dev5->streamlit) (58.1.0)
Collecting jedi>=0.16
Using cached jedi-0.18.1-py2.py3-none-any.whl (1.6 MB)
Collecting pickleshare
Using cached pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Collecting jupyter-core>=4.9.2
Using cached jupyter_core-4.10.0-py3-none-any.whl (87 kB)
Collecting pyzmq>=22.3
Using cached pyzmq-22.3.0-cp310-cp310-win_amd64.whl (1.1 MB)
Collecting fastjsonschema
Using cached fastjsonschema-2.15.3-py3-none-any.whl (22 kB)
Collecting notebook>=4.4.1
Using cached notebook-6.4.11-py3-none-any.whl (9.9 MB)
Collecting parso<0.9.0,>=0.8.0
Using cached parso-0.8.3-py2.py3-none-any.whl (100 kB)
Collecting pywin32>=1.0
Using cached pywin32-303-cp310-cp310-win_amd64.whl (9.2 MB)
Collecting argon2-cffi
Using cached argon2_cffi-21.3.0-py3-none-any.whl (14 kB)
Collecting nbconvert>=5
Using cached nbconvert-6.5.0-py3-none-any.whl (561 kB)
Collecting Send2Trash>=1.8.0
Using cached Send2Trash-1.8.0-py3-none-any.whl (18 kB)
Collecting terminado>=0.8.3
Using cached terminado-0.13.3-py3-none-any.whl (14 kB)
Collecting prometheus-client
Using cached prometheus_client-0.14.1-py3-none-any.whl (59 kB)
Collecting wcwidth
Using cached wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting asttokens
Using cached asttokens-2.0.5-py2.py3-none-any.whl (20 kB)
Collecting pure-eval
Using cached pure_eval-0.2.2-py3-none-any.whl (11 kB)
Collecting executing
Using cached executing-0.8.3-py2.py3-none-any.whl (16 kB)
Collecting tinycss2
Using cached tinycss2-1.1.1-py3-none-any.whl (21 kB)
Collecting beautifulsoup4
Using cached beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
Collecting pandocfilters>=1.4.1
Using cached pandocfilters-1.5.0-py2.py3-none-any.whl (8.7 kB)
Collecting jupyterlab-pygments
Using cached jupyterlab_pygments-0.2.2-py2.py3-none-any.whl (21 kB)
Collecting defusedxml
Using cached defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting mistune<2,>=0.8.1
Using cached mistune-0.8.4-py2.py3-none-any.whl (16 kB)
Collecting bleach
Using cached bleach-5.0.0-py3-none-any.whl (160 kB)
Collecting nbclient>=0.5.0
Using cached nbclient-0.6.0-py3-none-any.whl (70 kB)
Collecting pywinpty>=1.1.0
Using cached pywinpty-2.0.5-cp310-none-win_amd64.whl (1.4 MB)
Collecting argon2-cffi-bindings
Using cached argon2_cffi_bindings-21.2.0-cp36-abi3-win_amd64.whl (30 kB)
Collecting cffi>=1.0.1
Using cached cffi-1.15.0-cp310-cp310-win_amd64.whl (180 kB)
Collecting soupsieve>1.2
Using cached soupsieve-2.3.2.post1-py3-none-any.whl (37 kB)
Collecting webencodings
Using cached webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting pycparser
Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Using legacy 'setup.py install' for tornado, since package 'wheel' is not installed.
Using legacy 'setup.py install' for blinker, since package 'wheel' is not installed.
Installing collected packages: webencodings, wcwidth, Send2Trash, pywin32, pytz, pure-eval, pickleshare, mistune, ipython-genutils, fastjsonschema, executing, certifi, blinker, backcall, zipp, watchdog, urllib3, tzdata, traitlets, tornado, toolz, toml, tinycss2, soupsieve, smmap, six, semver, pyzmq, pywinpty, pyrsistent, pyparsing, pympler, pygments, pycparser, psutil, protobuf, prompt-toolkit, prometheus-client, pillow, parso, pandocfilters, numpy, nest-asyncio, MarkupSafe, jupyterlab-widgets, jupyterlab-pygments, idna, entrypoints, defusedxml, decorator, debugpy, colorama, charset-normalizer, cachetools, attrs, validators, terminado, requests, pytz-deprecation-shim, python-dateutil, pyarrow, packaging, matplotlib-inline, jupyter-core, jsonschema, jinja2, jedi, importlib-metadata, gitdb, click, cffi, bleach, beautifulsoup4, asttokens, tzlocal, stack-data, pandas, nbformat, jupyter-client, gitpython, argon2-cffi-bindings, nbclient, ipython, argon2-cffi, altair, nbconvert, ipykernel, notebook, widgetsnbextension, ipywidgets, pydeck, streamlit
Running setup.py install for blinker ... done
Running setup.py install for tornado ... done
Successfully installed MarkupSafe-2.1.1 Send2Trash-1.8.0 altair-4.2.0 argon2-cffi-21.3.0 argon2-cffi-bindings-21.2.0 asttokens-2.0.5 attrs-21.4.0 backcall-0.2.0 beautifulsoup4-4.11.1 bleach-5.0.0 blinker-1.4 cachetools-5.0.0 certifi-2021.10.8 cffi-1.15.0 charset-normalizer-2.0.12 click-8.0.4 colorama-0.4.4 debugpy-1.6.0 decorator-5.1.1 defusedxml-0.7.1 entrypoints-0.4 executing-0.8.3 fastjsonschema-2.15.3 gitdb-4.0.9 gitpython-3.1.27 idna-3.3 importlib-metadata-4.11.3 ipykernel-6.13.0 ipython-8.3.0 ipython-genutils-0.2.0 ipywidgets-7.7.0 jedi-0.18.1 jinja2-3.1.2 jsonschema-4.4.0 jupyter-client-7.3.0 jupyter-core-4.10.0 jupyterlab-pygments-0.2.2 jupyterlab-widgets-1.1.0 matplotlib-inline-0.1.3 mistune-0.8.4 nbclient-0.6.0 nbconvert-6.5.0 nbformat-5.3.0 nest-asyncio-1.5.5 notebook-6.4.11 numpy-1.22.3 packaging-21.3 pandas-1.4.2 pandocfilters-1.5.0 parso-0.8.3 pickleshare-0.7.5 pillow-9.1.0 prometheus-client-0.14.1 prompt-toolkit-3.0.29 protobuf-3.20.1 psutil-5.9.0 pure-eval-0.2.2 pyarrow-7.0.0 pycparser-2.21 pydeck-0.7.1 pygments-2.12.0 pympler-1.0.1 pyparsing-3.0.8 pyrsistent-0.18.1 python-dateutil-2.8.2 pytz-2022.1 pytz-deprecation-shim-0.1.0.post0 pywin32-303 pywinpty-2.0.5 pyzmq-22.3.0 requests-2.27.1 semver-2.13.0 six-1.16.0 smmap-5.0.0 soupsieve-2.3.2.post1 stack-data-0.2.0 streamlit-1.8.1 terminado-0.13.3 tinycss2-1.1.1 toml-0.10.2 toolz-0.11.2 tornado-6.1 traitlets-5.1.1 tzdata-2022.1 tzlocal-4.2 urllib3-1.26.9 validators-0.18.2 watchdog-2.1.7 wcwidth-0.2.5 webencodings-0.5.1 widgetsnbextension-3.6.0 zipp-3.8.0
PS C:\Users\omo> streamlit hello
Welcome to Streamlit!
If you're one of our development partners or you're interested in getting
personal technical support or Streamlit updates, please enter your email
address below. Otherwise, you may leave the field blank.
Email:
Privacy Policy:
As an open source project, we collect usage statistics. We cannot see and do
not store information contained in Streamlit apps. You can find out more by
reading our privacy policy at: https://streamlit.io/privacy-policy
If you'd like to opt out of usage statistics, add the following to
%userprofile%/.streamlit/config.toml, creating that file if necessary:
[browser]
gatherUsageStats = false
Welcome to Streamlit. Check out our demo in your browser.
Local URL: http://localhost:8501
Network URL: http://192.168.1.13:8501
Ready to create your own Python apps super quickly?
Head over to https://docs.streamlit.io
May you create awesome apps!
Streamlitインストール完了
関連項目
-
Streamlit デモ(python簡単アプリ作成)
Streamlit デモ Streamlitがインストール出来たら、 PowerShellでstreamlit hellowコマンドを打つと 指定のport番号のデモブラウザ画面が立ち上がります。 デ ...
アナコンダ仮想環境へのインストール
-
Streamlit Install
Streamlitのインストール 事前準備 favorite IDE or text editor Python 3.7 - Python 3.10 PIP 仮想環境のセットアップ Streamlit ...