Use #!/usr/bin/env python instead of #!/usr/local/bin/python.
diff --git a/Doc/tools/keywords.py b/Doc/tools/keywords.py
index 52b4d68..6da352a 100644
--- a/Doc/tools/keywords.py
+++ b/Doc/tools/keywords.py
@@ -1,4 +1,4 @@
-#! /usr/local/bin/python
+#! /usr/bin/env python
 
 # This Python program sorts and reformats the table of keywords in ref2.tex