Python and cron jobs

I’m moving on from jQuery and the JS portion to do more server side and cross-domain programming for my next set of programming goals. Learning to install python3 on dreamhost was not impossible though I am still stuck a little bit on figuring out a couple small details:

  1. Programs run in the shell run fine using “python3 scriptname”.
  2. Scripts accessed via the webserver do NOT run using python3 (using /usr/bin/env python3) (.bashrc and .bash_profile have the $PATH variable set according to the dreamhost tutorials)
  3. CRON jobs work after I prepend the original call with
    source ~/.bashrc; rest of code
    Helpful solution here

I would ideally like to have #!/usr/bin/env python3 so I can write and test scripts locally before uploading and not need to change it.

My current workaround is by specifying the version of python I find using which python3 command at the top of the script.

 

Question:  Why is /usr/bin/env python3 not working?

This script works when I change the shebang line to point to my local install of python3 (3.6.2). Otherwise at runtime (served up by accessing the file via browser) yields python 3.4.x. dreamhost runs python2, I installed 3.6.2, where is this other version coming from??