![]() ![]() 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. If it’s a percentage sign ( %), you’re most likely using zsh. Run the command python on the command line. Navigate to the directory where Python is installed. If it’s a dollar sign ( $), you’re most likely using bash. Open command prompt by going to the Run box and type in cmd. 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 |