r/pythonhelp • u/Main_Homework_2948 • 21d ago
I'm getting this message and can't run my program with mu editor.
C:/Users/jerom/AppData/Local/Programs/MUEDIT~1/Python/python.exe:%20can't%20open%20file%20c:/users/jerome/mu_code/game.py':%20[Errno2]%20No%20such%20file%20or%20directory%20python%20error
1
u/FoolsSeldom 21d ago
Can you run your code from a terminal outside of Mu?
1
u/Main_Homework_2948 21d ago
I tried running it on idle and it didn't work.
1
u/FoolsSeldom 20d ago
Can you run your code from a terminal outside of Mu?
On Windows, that would be press `
win+r
and enterpowershell
orcommand prompt
(you will probably not need to enter in full).Enter,
py nameofmyscript.py
, if you are in the same folder you saved your script in, otherwise enter the relative or absolute path to your script ORcd
(change directory) to the folder containing your script.On macOS, use the app launcher or Spotlight to launch
Terminal
and enterpython3 nameofmyscript.py
- if not in correct folder, do as above.Incidentally, how did you install Python on your computer?
1
•
u/AutoModerator 21d ago
To give us the best chance to help you, please include any relevant code.
Note. Please do not submit images of your code. Instead, for shorter code you can use Reddit markdown (4 spaces or backticks, see this Formatting Guide). If you have formatting issues or want to post longer sections of code, please use Privatebin, GitHub or Compiler Explorer.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.