Python Forum
Can't Find Python (or Something)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't Find Python (or Something)
#1
I've been trying to use Python for several days without success. So I am seeking support.

I am running MacOS Sonoma 14.1.1 on a new MacBook. I installed 'successfully' Python 3.12.0. I had a long Python script that I have not been able to get running as every attempt, no matter what I do, results in file not found errors.

So I wrote a simple Python script titled hello_world.py in hopes I could locate and repair the situation.

Here is my code:

`
# Print the message "Hello, World!"
print("Hello, World!")
`

No matter what I do I get this result:

`
zsh: command not found: python
`

I have verified with the command python3 --version that Python exists as it returns 'Python 3.12.0'

I have verified that the PATH included usr/bin and usr/local/bin

I have tried adding a .zshrc file with paths to these directories.

I have even tried explicitly running the commands /usr/local/bin/python hello_world.py and /usr/bin/python hello_world.py

Every attempt simply returns the same or similar error indicating command not found or sometimes no such file or directory.

Three days in, I would cherish hearing from anyone who may know what I am doing incorrectly.

thanx,

ken
Reply


Messages In This Thread
Can't Find Python (or Something) - by pklind - Nov-26-2023, 02:23 AM
RE: Can't Find Python (or Something) - by perfringo - Nov-26-2023, 07:12 AM
RE: Can't Find Python (or Something) - by snippsat - Nov-26-2023, 11:11 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020