Streamlitの実行
VScodeを使いStreamlitの実行をしたいです。
発生している問題・エラーメッセージ
raceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/bin/streamlit", line 6, in <module> from streamlit.cli import main File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/streamlit/__init__.py", line 76, in <module> from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/streamlit/delta_generator.py", line 41, in <module> from streamlit.elements.altair import AltairMixin File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/streamlit/elements/altair.py", line 26, in <module> import altair as alt File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/altair/__init__.py", line 4, in <module> from .vegalite import * File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/altair/vegalite/__init__.py", line 2, in <module> from .v4 import * File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/altair/vegalite/v4/__init__.py", line 2, in <module> from .schema import * File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/altair/vegalite/v4/schema/__init__.py", line 2, in <module> from .core import * File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/altair/vegalite/v4/schema/core.py", line 4, in <module> from altair.utils.schemapi import SchemaBase, Undefined, _subclasses File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/altair/utils/__init__.py", line 1, in <module> from .core import ( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/altair/utils/core.py", line 14, in <module> import pandas as pd File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pandas/__init__.py", line 16, in <module> raise ImportError( ImportError: Unable to import required dependencies: numpy: IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed. We have compiled some common reasons and troubleshooting tips at: https://numpy.org/devdocs/user/troubleshooting-importerror.html Please note and check the following: * The Python version is: Python3.8 from "/Library/Frameworks/Python.framework/Versions/3.8/bin/python3" * The NumPy version is: "1.20.3" and make sure that they are the versions you expect. Please carefully study the documentation linked above for further help. Original error was: dlopen(/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-darwin.so, 2): no suitable image found. Did find: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-darwin.so: mach-o, but wrong architecture /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-darwin.so: mach-o, but wrong architecture```
試したこと
import streamlit as st import pandas as pd import numpy as np st.title('My 2st')
補足情報(FW/ツールのバージョンなど)
Python3.8.10,Streamlitなど既にダウンロード済みです。
macOSだと思います。
OSのバージョン、マシンのCPUがなにか、Pythonをどうやってインストールしたのか、numpyをどうやってインストールしたのかを、質問を編集して追記しましょう。
あなたの回答
tips
プレビュー