pythonでstreamlitが実行できない、インストールできない場合の対策

python64bitとpython32bitが両方インストールされている状態で、streamlitをインストール。streamlit hello とコマンドプロンプトで打って実行すると、「OSError: [WinError 193] %1 は有効な Win32 アプリケーションではありません。」

とでて前に進まなかったので、python64bitだけにしたりpython32bitだけにしたりいろいろしたらstreamlitのインストールができなくなった。python64bitもpython32bit消してpython関連のファイルをすべて削除した状態で、python64bitをインストール。pipのバージョンアップだけして、pip install streamlitをしたら無事にインストールできた。

> 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:

なんかできそうでよかった。メールアドレスは入力せず、エンターを押したら、webサイトが開いたので成功。

pythonは結局全部最新バージョンにすればなんでも解決できることがわかった。

streamlitのみインストール直後のライブラリリストです。

pip list
Package Version
------------------- ---------
altair 4.1.0
argon2-cffi 20.1.0
astor 0.8.1
async-generator 1.10
attrs 21.2.0
backcall 0.2.0
base58 2.1.0
bleach 4.0.0
blinker 1.4
cachetools 4.2.2
certifi 2021.5.30
cffi 1.14.6
charset-normalizer 2.0.4
click 7.1.2
colorama 0.4.4
debugpy 1.4.1
decorator 5.0.9
defusedxml 0.7.1
entrypoints 0.3
gitdb 4.0.7
GitPython 3.1.18
idna 3.2
ipykernel 6.0.3
ipython 7.26.0
ipython-genutils 0.2.0
ipywidgets 7.6.3
jedi 0.18.0
Jinja2 3.0.1
jsonschema 3.2.0
jupyter-client 6.1.12
jupyter-core 4.7.1
jupyterlab-pygments 0.1.2
jupyterlab-widgets 1.0.0
MarkupSafe 2.0.1
matplotlib-inline 0.1.2
mistune 0.8.4
nbclient 0.5.3
nbconvert 6.1.0
nbformat 5.1.3
nest-asyncio 1.5.1
notebook 6.4.2
numpy 1.21.1
packaging 21.0
pandas 1.3.1
pandocfilters 1.4.3
parso 0.8.2
pickleshare 0.7.5
Pillow 8.3.1
pip 21.2.3
prometheus-client 0.11.0
prompt-toolkit 3.0.19
protobuf 3.17.3
pyarrow 5.0.0
pycparser 2.20
pydeck 0.6.2
Pygments 2.9.0
pyparsing 2.4.7
pyrsistent 0.18.0
python-dateutil 2.8.2
pytz 2021.1
pywin32 301
pywinpty 1.1.3
pyzmq 22.2.1
requests 2.26.0
Send2Trash 1.8.0
setuptools 56.0.0
six 1.16.0
smmap 4.0.0
streamlit 0.86.0
terminado 0.10.1
testpath 0.5.0
toml 0.10.2
toolz 0.11.1
tornado 6.1
traitlets 5.0.5
tzlocal 2.1
urllib3 1.26.6
validators 0.18.2
watchdog 2.1.3
wcwidth 0.2.5
webencodings 0.5.1
widgetsnbextension 3.5.1

この記事が気に入ったらサポートをしてみませんか?