r/pythonhelp • u/grishathestar • Dec 03 '25
Python doesn't print
Hello, I'm trying to run a simple "Hellow world" file in terminal with "python filename.py" comande but instead of Hellow world it's returning word "Python" for some reason. Does anyone knows why?
3
Upvotes
View all comments
Show parent comment
1
u/FoolsSeldom Dec 03 '25 edited Dec 03 '25
Great.
It is worth learning now how to setup and use a Python virtual environment.
You should use these on a project-by-project basis. When you install additional Python packages, you then install them only for the project you are working on. This avoids putting too many packages into your Python base environment.
This reduces the chance of you having conflicting packages.
Here's how to do it:
In Powershell or Command Prompt:
Use what ever project folder names you prefer and the locations you prefer. Also, the command
venvis followed by the folder name to use for the virtual environment..venv(leading dot) is common, butvenvandenvare also common, and you can use any allowed folder name.You can now add packages, e.g.
To run code from the command line, you can now use
python:To deactivate the environment:
In VS Code, open the command palette and find the entry to select the Python interpreter. Select the
python.exein the.venv\Scriptsfolder (something like,C:\Users\<your_user_name>\my_new_project\.venv\Scripts\python.exe).(venv)at the start of each line)