This process will help you resolve an issue when you have installed software, such as Python, but the software is not properly recognized in the terminal.
- Open terminal using either Spotlight (the magnifying glass in the upper righthand corner) or navigating to
Macintosh HD > Applications > Terminal - Try the following command to verify the problem:
If an old version of Python, such as Python 2.7 (or no version), is returned, you'll need to update your symbolic links.python --version
- Verify where your new installation is installed. The following command will search your computer for where there are existing Python installations:
The terminal should return a list of places where Python is installed.ls -l /usr/local/bin/python*
Find the location for the version of Python you would like to use, such as:/usr/local/bin/python3.9
- Finally, we will create the symbolic link. Assuming the link is at
/usr/local/bin/python3.9
, enter:ln -s -f /usr/local/bin/python3.9 /usr/local/bin/python
- Close your terminal session and open a new one. Enter:
You should receive the correct version in response.python --version