#🔒 vsc python [zsh problem]
32 messages · Page 1 of 1 (latest)
@worn hawk
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
You're trying to do python on the zsh command prompt
how can i not do it on the zsh command prompt? i'm sorry i'm super new to this
There are two windows there. The top one is for typing code and the bottom one is for interacting with your system. you can type python script.py to run your code from there
There's probably a VS Code button to do it as well.
there is, assuming you have the python extension installed
@worn hawk Try pressing that play button in the upper right corner
i have it installed
then yeah, long story short that should make this button work
the print("hello world") is working
but when i try to run 1+2 on the terminal, it says zsh command not found
because you're in zsh there, not Python
From that console window you can navigate around your filesystem. If you wanted to open a Python interpreter there you could by just typing python and hitting enter.
You'd need to exit out of the Python interpreter before doing anything outside of Python if you did that.
oh is the select interpreter thingy? i already did that but it didn't change anything, but if i type python3 on the terminal and run 1+2, it works, is it a valid fix to that
python has an interactive mode called the REPL where you can evaluate python code in the terminal
typing python or python3 on its own enters the REPL
that's why it's working
there's nothing to "fix" really
do you want to run it from a file, or in the REPL?
i don't get what that means i'm sorry T_T, but i want to type 1+2 on the terminal like in the tutorial (needed in class) and get 3, whatever that's called
should there be a python choice here?
in that case you would need to enter the repl by typing python
no, those are different shells
they're for interacting with your operating system
oh okioki tyyyy
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.