#π can't run script
61 messages Β· Page 1 of 1 (latest)
@vapid wharf
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 haven't saved the file yet. (Indicated by the white dot next to the file name).
Please do CTRL + S and try again please.
yes
I did 'open file', I made the file in IDLE and it worked there
Think so
Can you send a updated screenshot?
You haven't selected a python interpreter yet.
What shoud I select after?
Choose the version that you wish to use.
It asks me to select a python environment
then "browse" or "create virt envir"
Send screenshots please.
Do create virtual enviro.
Venv
after install
uv.exe
uvx.exe
uvw.exe
everything's installed!
too
Have you added python to the system path?
not sure
Open up a terminal and type python --version
If you don't get version info then python isn't on your PATH
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Apps > Advanced app settings > App execution aliases.
Okay yeah it's not on your PATH then. Are you on Windows 11?
Okay, go to start, search for "environment variables". Right click the first entry that comes up and click "Run as administrator". You should see a window like this
testing
yes I got the window
Click the "Environment variables" button. Another window should come up. In that other window in the second pane closest to the bottom (System variables) scroll down and highlight Path (keep in mind what's currently listed in your Path will be different than mine in the screenshot)
Then click the "Edit..." button
When you do so a third window will come up
I got options to select now oracle/java, systemroot, mullvad VPN
ect
Is this in a window with the title "Edit environment variable"?
yes is path edit
Okay. Now you need to find the folder where your Python executable is installed. Should be in C:\Users\<your-username>\AppData\Local\Python\bin. Open file explorer, replace <your-username> in the path I just gave you with your username and enter that path in the top of the file explorer. Make sure the folder exists and there's a python.exe in that folder.
For example here's mine
I got launcher and python314 file folder
C:\Users\myuser\AppData\Local\Programs\Python
So what's inside C:\Users\myuser\AppData\Local\Programs\Python? Just folders for launcher and python314?
yes
Okay, inside C:\Users\myuser\AppData\Local\Programs\Python\python314 make sure there's a python.exe file
Okay good. So copy that folder path and go back to the "Edit environment variable" window that you had open. Hit the "New" button in that window. Use ctrl+v to paste the folder path in the input field that comes up. Then click the OK button. That window should close. Then hit the OK button in the "Environment variables" window and that window should close. Then hit the OK button in the "System Properties" window and that window will close too. Then open up a new terminal (not the same one that you had open before) and type python --version again.
thanks
Good, Python is now on your path
Yep no problem!
This help channel has been closed. 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.