WAKU-TAKE-A BLOG
メニューを開く
ブログ
GitHub
ツイッター
プログラム
プロフィール
Home
termux
android streamlit termux
Termux上でStreamlitを動作させてみた
Android Termux 上で Streamlit を動作させる手順(2026年5月)
# ポイント - Python 3.13 に揃える - pip build 地獄を避ける - numpy は pkg 版を使う - watchdog は無効化 - pandas は諦めた --- # 1. Python / 開発環境確認 ```bash python --version pip --version ``` 確認例: ```text Python 3.13.13 pip 26.x ``` --- # 2. システム更新(重要) Python 本体と repo パッケージの整合を取る。 ```bash pkg upgrade -y ``` --- # 3. 開発系パッケージ導入 ```bash pkg install -y \ clang \ cmake \ make \ rust \ libjpeg-turbo \ libpng \ freetype ``` --- # 4. numpy は pkg 版を使う(超重要) pip install numpy は build 失敗しやすい。 Termux repo 版を使用。 ```bash pkg install -y python-numpy ``` 確認: ```bash python -c "import numpy; print(numpy.__version__)" ``` --- # 5. Streamlit 本体だけ先に導入 依存全部を一気に入れない。 ```bash pip install streamlit --no-deps --no-cache-dir ``` --- # 6. 不足依存を順番に追加 ```bash ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. ``` などのエラーが大量に出ますが、最後に `Successfully installed...` とでれば、ひとまずOK。 ## blinker ```bash pip install blinker --no-cache-dir ``` --- ## uvicorn 系 ```bash pip install \ typing-extensions \ websockets \ uvicorn \ --no-cache-dir ``` --- ## protobuf ```bash pip install protobuf --no-cache-dir ``` --- ## cachetools ```bash pip install cachetools --no-cache-dir ``` --- ## ASGI系 ```bash pip install \ starlette \ anyio \ sniffio \ h11 \ --no-cache-dir ``` --- ## toml ```bash pip install toml --no-cache-dir ``` --- ## requests ```bash pip install requests --no-cache-dir ``` --- ## itsdangerous ```bash pip install itsdangerous --no-cache-dir ``` --- ## packaging(警告回避) ```bash pip install packaging --no-cache-dir ``` --- # 7. 動作確認 ## app.py 作成 ```bash cat > app.py << 'EOF' import streamlit as st st.title("Hello Termux Streamlit") st.write("Streamlit on Android Termux") EOF ``` --- # 8. Streamlit 起動 watchdog を無効化する。 ```bash streamlit run app.py \ --server.fileWatcherType none \ --server.headless true ``` --- # 9. ブラウザで開く Android ブラウザで: ```text http://127.0.0.1:8501 ``` または: ```text http://localhost:8501 ``` --- # pandas について ## pandas は未導入でも Streamlit は動く 以下は pandas 不要: ```python import streamlit as st st.title("hello") st.button("OK") st.slider("x", 0, 100) ``` --- ## pandas が必要になるケース ```python import pandas as pd df = pd.read_csv("a.csv") ``` ```python st.dataframe(df) ``` --- # なぜ pip install numpy が失敗するのか Termux + Python 3.13 環境では: - ninja - meson - spawn.h - build isolation 周辺で build 失敗しやすいようです。 そのため: ```text pkg install python-numpy ``` が安全。pandasはなかった。残念。 --- # 今回の構成 - Android - Termux - Python 3.13 - Streamlit 1.57 - numpy(pkg版) - pandas無し で正常動作確認しました。streamlitのコアが動作した感じです。
この記事をシェアする
X
Facebook
B!
はてブ
Copy
URL
0 件のコメント :
コメントを投稿
Previous
自己紹介
WAKU-TAKE-A
詳細プロフィールを表示
人気記事
サクラエディターでGrep置換
Visual Studioのソリューションファイルのダウングレード
Markdown PDFのすすめ
Zenfone2 Laser ZE500KLをRoot化してみます
Python3でBasic認証
Markdown TOCのすすめ
ゾーン識別子によるエラー
Python3でDigest認証
IronPythonのスクリプトをVisual Studio Codeで実行する方法(旧)
GitBucket+OpenLDAPでGitHubクローンな環境
カテゴリー
android
( 1 )
blogger
( 5 )
Bsic認証
( 1 )
Digest認証
( 1 )
dll化
( 1 )
Git
( 3 )
GitBucket
( 3 )
Google Form
( 1 )
IronPython
( 14 )
Ldap
( 3 )
Livet
( 2 )
Markdown
( 4 )
Markdown PDF
( 1 )
Markdown TOC
( 1 )
MVVM
( 4 )
OpenCV
( 5 )
OpenCvSharp
( 4 )
OpenLdap
( 3 )
PDF
( 1 )
pip
( 1 )
Pyhon
( 3 )
R.NET
( 1 )
ROOT
( 1 )
R言語
( 1 )
streamlit
( 1 )
termux
( 1 )
TWRP
( 1 )
Vaster2
( 2 )
Visual Studio
( 1 )
Visual Studio Code
( 4 )
Windows
( 5 )
WPF
( 3 )
XAML
( 3 )
ZE500KL
( 1 )
Zenfone2 laser
( 1 )
ZXing
( 1 )
ZXing. Net
( 1 )
エラー調査
( 1 )
コーヒー
( 1 )
サクラエディタ
( 1 )
ショッピング
( 2 )
データバインディング
( 3 )
テンプレート
( 3 )
リモートデスクトップ接続
( 5 )
在宅勤務
( 5 )
生成AI
( 1 )
注意点
( 1 )
統計解析R
( 1 )
特別定額給付金
( 1 )
淹れ方
( 1 )
ブログアーカイブ
5月 2026
( 2 )
3月 2026
( 1 )
12月 2025
( 1 )
10月 2023
( 2 )
5月 2020
( 3 )
4月 2020
( 4 )
7月 2019
( 1 )
5月 2019
( 5 )
2月 2019
( 1 )
12月 2018
( 2 )
11月 2018
( 4 )
10月 2018
( 3 )
8月 2018
( 5 )
7月 2018
( 3 )
6月 2018
( 7 )
2月 2018
( 2 )
10月 2016
( 1 )
0 件のコメント :
コメントを投稿