'Runnig Python in Atom on MacBook doesn't work any more

I have installed and set an Atom on my MacBook. I have installed packages like a script, atom-python-run. I have installed the latest python from their official website too. I was able to run python programs in the default terminal with command+F5 without any trouble. Until today. There is a problem while running python in the terminal (command+F5) and in the atom (command+i).

When I run python in the terminal it gives me:

Last login: Thu Mar 24 12:25:50 on ttys000
python /Users/zalezina/.atom/packages/atom-python-run/lib/../cp/main.py --pause -- python /Users/zalezina/Documents/Zinek/Atom/first-project/test.py
zalezina@Uross-MacBook-Air \~ %  python /Users/zalezina/.atom/packages/atom-python-run/lib/../cp/main.py --pause -- python /Users/zalezina/Documents/Zinek/Atom/first-project/test.py
zsh: command not found: python
zalezina@Uross-MacBook-Air \~ %

In I run python in the atom it gives me:

Python - test.py:2
Unable to run
python
Did you start Atom from the command line?
atom.
Is it in your PATH?
PATH: /Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

I have tried to uninstall Atom and packages and then install them all again, but the same problem is still there.

Can someone please help me to run python in Atom on Mac again?



Solution 1:[1]

Try calling python3 instead of just python in the terminal. If that works, you could alias python to python3 by entering this into terminal echo "alias python=/usr/bin/python3" >> ~/.zshrc to alias python to python3. This one has worked for me.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kig