python streamlit run issue
Question:
I’m trying to run streamlit application(python 3.7.3) after installing it shows that error
streamlit hello
File "<ipython-input-2-c7a1b683aa76>", line 1
streamlit hello
^
SyntaxError: invalid syntax
Answers:
A bit late, but here is the recommended setup for using on Windows: https://github.com/streamlit/streamlit/wiki/Installing-in-a-virtual-environment
Copy streamlit files in C:UsersAppDataRoamingPythonPython36Scripts
and paste them into your C:ProgramDataAnaconda3Scripts
and run your streamlit code in anaconda prompt.
Command to run:
streamlit run filename.py
In windows
py -m streamlit run hello.py
Actually it looks like you have misunderstood in where you have to use streamlit hello
. This command will bring you to the welcome page of streamlit if you have successfully installed streamlit. I assume that you are a beginner. This streamlit hello
should be entered in command prompt, But not in the Ipython Kernel. But you have entered this command into the Ipython Kernel. Look at this to learn how to use streamlit hello
and how to run a python script with streamlit.
To visit welcome page
$ streamlit hello
To run python script via streamlit
$ streamlit run script.py
I solved it by using the below command
- streamlit run filename.py
You can try this one:
streamlit run hello.py
python -m streamlit run <filename.py>
This will work definitely.
I’m trying to run streamlit application(python 3.7.3) after installing it shows that error
streamlit hello
File "<ipython-input-2-c7a1b683aa76>", line 1
streamlit hello
^
SyntaxError: invalid syntax
A bit late, but here is the recommended setup for using on Windows: https://github.com/streamlit/streamlit/wiki/Installing-in-a-virtual-environment
Copy streamlit files in C:UsersAppDataRoamingPythonPython36Scripts
and paste them into your C:ProgramDataAnaconda3Scripts
and run your streamlit code in anaconda prompt.
Command to run:
streamlit run filename.py
In windows
py -m streamlit run hello.py
Actually it looks like you have misunderstood in where you have to use streamlit hello
. This command will bring you to the welcome page of streamlit if you have successfully installed streamlit. I assume that you are a beginner. This streamlit hello
should be entered in command prompt, But not in the Ipython Kernel. But you have entered this command into the Ipython Kernel. Look at this to learn how to use streamlit hello
and how to run a python script with streamlit.
To visit welcome page
$ streamlit hello
To run python script via streamlit
$ streamlit run script.py
I solved it by using the below command
- streamlit run filename.py
You can try this one:
streamlit run hello.py
python -m streamlit run <filename.py>
This will work definitely.