![]() ![]() Then press Ctrl+X and Enter to exit nano. Make sure to save (write out) by pressing Ctrl+O then Enter. If it has content already, scroll to the bottom using your down arrow key.Īdd the following line: alias python=python3 You can confirm by running: echo $SHELL Update your profileįirst, change into your Home directory: cd ~ĭepending on which shell you are using, enter one of the following: nano. You do not need to install or configure anything else to use Python 2. If it’s a percentage sign ( %), you’re most likely using zsh. Mac OS X comes with Python 2.7 out of the box. If it’s a dollar sign ( $), you’re most likely using bash. Open Terminal and look at the last character of the prompt. What shell are you using?įirst, determine what shell you are using. Here is how you how to fix this.įirst, check your Python version: Nats-MBP:~ natdunn$ python -V Instead, to run Python 3, you have to use the python3 command. When you install Python 3 on a Mac, it does not update the python command to use Python 3 instead of Python 2. Mapping python to Python 3 on Your Mac See Python: Tips and Tricks for similar articles.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |