title: How do I run a python 3 script that imports yaml from bash
body: <p>I am calling a python script using python2.x from inside a bash script.  How can I update it to python 3.X?</p>
  
  <p>This is a script I need to be able to distribute to clients, using the venv cli will not work</p>
  
  <p>Running on CentOS</p>
  
  <p>First I've installed any number of python 3 packages.</p>
  
  <pre><code>$ sudo yum list installed | grep python3
  
  python3-other-rpm-macros.noarch         3-25.el7                       @epel    
  python34.x86_64                         3.4.10-2.el7                   @epel    
  python34-devel.x86_64                   3.4.10-2.el7                   @epel    
  python34-libs.x86_64                    3.4.10-2.el7                   @epel    
  python34-pip.noarch                     8.1.2-8.el7                    @epel    
  python34-setuptools.noarch              39.2.0-3.el7                   @epel    
  python36.x86_64                         3.6.8-1.el7                    @epel    
  python36-libs.x86_64                    3.6.8-1.el7                    @epel    
  </code></pre>
  
  <pre><code>$ sudo pip3.4 install pyyaml
  Requirement already satisfied (use --upgrade to upgrade): pyyaml in /usr/lib64/python3.4/site-packages
  </code></pre>
  
  <p>from bash script do_update.sh</p>
  
  <pre><code>#!/bin/bash
  
  python3 update_yaml.py
  </code></pre>
  
  <p>from python script update_yaml.py</p>
  
  <pre><code>import sys
  import common_update
  import subprocess
  
  with open.('input.yaml') as in_yaml:
    input_data = yaml.safe_load(in_yaml)
  </code></pre>
  
  <p>I expect it to parse input.yaml</p>
  
  <p>Output: <code>"ModuleNotFoundError: No module named 'yaml'"</code></p>