3 回答

TA貢獻(xiàn)1836條經(jīng)驗(yàn) 獲得超13個(gè)贊
這件事發(fā)生在我身上。我使用 anaconda 提示符而不是 Windows cmd:
安裝 anaconda cmd 提示符
創(chuàng)造一個(gè)環(huán)境
對(duì)我來(lái)說(shuō)使用“activate”我只是使用了streamlit。
pip 安裝 Streamlit
輸入“streamlit hello”而不是“streamlit run hello”6:此網(wǎng)站可能有助于解決VsCode 中“C:\Users\AccountName\AppData\Local\Programs\Python\Python38-32\python.exe”錯(cuò)誤

TA貢獻(xiàn)1793條經(jīng)驗(yàn) 獲得超6個(gè)贊
如果您使用的是Windows操作系統(tǒng),您可以嘗試以下步驟:
首先需要下載Anaconda:https: //www.anaconda.com/
打開(kāi) Anaconda PowerShell 提示符并輸入以下內(nèi)容:
conda list
pip uninstall streamlit
然后,創(chuàng)建一個(gè)新環(huán)境,并測(cè)試以下內(nèi)容:
pip install streamlit
streamlit hello
最后,您可以在代碼上測(cè)試 Streamlit,將 your_app 替換為文件的實(shí)際名稱。確保您與源代碼文件位于同一目錄中。
streamlit run your_app.py

TA貢獻(xiàn)1804條經(jīng)驗(yàn) 獲得超7個(gè)贊
文檔應(yīng)該說(shuō):> Streamlit run app.py
嘗試: python Streamlit run hello
添加回答
舉報(bào)