

It’s a language that perfectly suits Mac because it overcomes traditional programming obstacles in order to humanize the coding process and make it more understandable.īut the sheer simplicity doesn’t make Python easy to learn. Python is a powerful programming tool, but it becomes a different kind of beast when you use it on a Mac. In this example, you'd now be able to type python -version and see the Python 3 version number.Last Updated: Wednesday 29 th December 2021 Replace with the name of the Python binary you want to link to (e.g., sudo ln -fs /usr/bin/python3 /usr/bin/python.

To change the link, use the command sudo ln -fs /usr/bin/python /usr/bin/python.If /usr/bin/python is linking to anything other than your preferred version, you can change the link. Use ls -l /usr/bin/python* to see all symbolic links for python.On other versions (or if you don't want to install a package), just create a symbolic link that makes the python command start python3 instead:.X Research source This ensures that running the python command always uses the Python 3 interpreter instead of other installed versions. On Ubuntu and Linux Mint, install python-is-python3 using the command sudo apt install python-is-python3.If you want to use Python 2 and Python 3 at the same time and want to make the python command launch python3, you have a few options: You should now be able to check the version with python -version.Ĭhange the default python to Python 3 (optional). Close your PowerShell window and open a new one.Click OK until you've exited out of the app.

It's the same path, but with \Scripts at the end, e.g., C:\Users\yourname\AppData\Local\Programs\Python\Python311\Scripts.
