title: Centos python shebang doesn't work for 3.6
body: <p>I cannot get Centos to use python3. Installed python3 via yum, it has created v3.6. With this test program it works only if I specify the v2 version.</p>
  <pre><code>#!/usr/bin/python3
  print &quot;Content-type:text/html\r\n\r\n&quot;
  print &quot;test&quot;
  </code></pre>
  <p>#!/usr/bin/python3 - internal server error 500</p>
  <p>#!/usr/bin/python3.6 - internal server error 500</p>
  <p>#!/usr/bin/env python3 - internal server error 500</p>
  <p>#!/usr/bin/python2.7 - runs</p>
  <p>#!/usr/bin/python - runs</p>
  <p>#!/usr/bin/env python - runs</p>
  <p>If I type python3 at a prompt then it opens the python system, so the links are clearly working.</p>
  <pre><code>$ python3
  Python 3.6.8 (default, Nov 16 2020, 16:55:22)
  [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
  Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
  </code></pre>
  <p>The links all appear to be correct</p>
  <pre><code>$ cd /usr/bin
  $ ls -al pyt*
  lrwxrwxrwx 1 root root    16 Oct 15 23:27 python -&gt; /usr/bin/python2
  lrwxrwxrwx 1 root root    18 Oct 15 23:27 python2 -&gt; /usr/bin/python2.7
  -rwxr-xr-x 1 root root  7144 Nov 16  2020 python2.7
  -rwxr-xr-x 1 root root  1835 Nov 16  2020 python2.7-config
  lrwxrwxrwx 1 root root    16 Oct 15 22:31 python2-config -&gt; pythonl2.7-config
  lrwxrwxrwx 1 root root     9 Oct 15 23:48 python3 -&gt; python3.6
  -rwxr-xr-x 2 root root 11328 Nov 16  2020 python3.6
  -rwxr-xr-x 2 root root 11328 Nov 16  2020 python3.6m
  lrwxrwxrwx 1 root root    14 Oct 15 22:31 python-config -&gt; python2-config
  </code></pre>
  <p>There is only one installation of python 3 (and another of python2.7)
  $ which python3
  /usr/bin/python3</p>
  <p>PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/manningk/.local/bin:/home/manningk/bin</p>
  <p>File created from scratch in VI to avoid problems with line endings. Have uninstalled/reinstalled python3 via yum.</p>
  <p>File is executable
  -rwxr-xr-x  1 apache apache    32 Oct 16 20:39 test2.py</p>
  <p>Honestly, I'm stuck. Is it a simple typo I can't see or what? Thanks</p>