I keep getting an error on python path when I open terminal

324 views Asked by At

I recently updated python on my mac and since then, whenever I open terminal there's the following error shown:

File "/opt/homebrew/share/man/man1/python3.1", line 1
  .TH PYTHON "1"
  ^
SyntaxError: invalid syntax

Any idea how to resolve this issue?

1

There are 1 answers

1
Jasper Tresidder On

Try reinstalling:
visit https://www.python.org/downloads/ on your Mac;
It detects your operating system automatically and shows a big button for downloading the latest version of Python installer on your Mac. Install (I recomend the latest python3.10, not python3.1) python, pip is included and useful for managing packages on the command line.

Open terminal and type:

$python3

into terminal, NOT:

$python

Hope this helps.