1
1

More than 1 year has passed since last update.

【streamlit】streamlit hello で コマンドとして認識されていないというエラーが出たときの対処法

Last updated at Posted at 2022-02-23

はじめに

streamlitをやり始めたときに、遭遇したエラーの解決方法です。

環境

Windows10
python3.9

streamlitをインストールします。

>pip install streamlit

streamlit helloを実行します。

>streamlit hello

ここでstreamlitは内部コマンドまたは外部コマンドとして認識されていませんというエラーが出ました。

streamlitにPATHを通します。

1.pip installでstreamlit.exeがインストールされているディレクトリを見つけます。
私の場合は、C:\Users\hogehoge\AppData\Roaming\Python\Python39\Scripts\streamlit.exe にいました。

2.PATHを通します。
・STARTボタンを右クリック⇒システム⇒システムの詳細設定
image.png

・環境変数をクリック
・hogehogeのユーザ環境変数のPathを選択して編集ボタンをクリック
・環境変数名の編集になるので、以下を追加します。
C:\Users\hogehoge\AppData\Roaming\Python\Python39\Scripts

・streamlit hello を実行するとデモアプリが起動します。

おわりに

今回の記事は以上になります。では、また。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1