can not run hello world from terminal
I came across the same problem idk how to fix it. I followed everything until the end of the first topic. I’m using MacBook M2 btw.
Hi can you type the below command and see what is the output
windows
python --version
mac
python3 --version
If you get an error it usually means python is not properly installed or it is not included in your systems PATH variable. If it is properly installed you should see your python version like: Python 3.10
here is an article on how to add python to PATH on both windows and Mac, you can also watch some youtube vids to help if you get stuck
II did as suggested
But still no success
can you run the file outside of vscode?
ie: in the powershell console there or in cmd terminal, if you run python app.py do you get hello world output? Make sure you cd into the folder where the file exists and run the command.
If you do get the right output it could be an issue with your python interpretor settings in vscode
No you can’t run the file in the python interpretor. Don’t enter the command “python”
When inside this directory C:\Users\Richard Nawiini\
type cd hello world
then you will be inside the directory when the python file app.py
exists. when you command line looks like C:\Users\Richard Nawiini\hello world
then type python app.py
it should then run the file and you will see the hello world output on the screen.
But the issue you are having seems to be related to your python interpretor settings inside vscode because your python interpretor is working in the command line. There is some good youtube videos to configure your python interpretor inside vscode
got it this time on python interpretor but not on pycharm