Nov-26-2023, 02:23 AM
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
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