Python 3.6.4 is used in E-MapReduce (EMR).

Install Python 3.6.4

  • By default, Python 3.6.4 is installed in EMR V2.10.0 and later 2.X.X versions, and V3.10.0 and later 3.X.X versions.

    The installation directory is /usr/bin/python3.6.

  • In EMR V2.X.X earlier than V2.10.0 and V3.X.X earlier than 3.10.0, you must perform the following steps to download and install Python 3.6.4:
    1. Download the software package Python-3.6.4.tgz.
    2. Use the file transfer tool SSH Secure File Transfer Client to upload the JAR package to the /usr/local directory of the master node of your cluster.
    3. Decompress the package and install the software.
      1. Log on to the master node of your cluster. For more information, see Connect to the master node of an EMR cluster in SSH mode.
      2. Create an installation directory for Python 3.6.4.
        mkdir -p /usr/local/python3
      3. Decompress the downloaded package.
        tar zxvf Python-3.6.4.tgz
      4. Access the folder where the installation file resides and specify the installation path.
        cd Python-3.6.4 
        ./configure --prefix=/usr/local/python3
      5. Compile and install the software.
        make && make install
      6. Create a symbolic link to Python 3.6.4.
        ln -s /usr/local/python3/bin/python3 /usr/bin/python3
    4. Check whether Python 3.6.4 is installed.
      python3 -V
      If the following information is returned, Python 3.6.4 is installed:
      Python 3.6.4
    5. Check whether pip3 is installed.
      pip3 -V
      If the following information is returned, pip3 is installed:
      pip 9.0.1 from /usr/local/Python-3.6.4/lib/python3.6/site-packages (python 3.6)