How To Install PyYAML.x86_64 on Amazon Linux 2

In this tutorial we learn how to install PyYAML.x86_64 in Amazon Linux 2. PyYAML.x86_64 is YAML parser and emitter for Python

Introduction

In this tutorial we learn how to install PyYAML.x86_64 on Amazon Linux 2.

What is PyYAML.x86_64

YAML is a data serialization format designed for human readability and interaction with scripting languages. PyYAML is a YAML parser and emitter for Python. PyYAML features a complete YAML 1.1 parser, Unicode support, pickle support, capable extension API, and sensible error messages. PyYAML supports standard YAML tags and provides Python-specific tags that allow to represent an arbitrary Python object. PyYAML is applicable for a broad range of tasks from complex configuration files to object serialization and persistance.

We can use yum to install PyYAML.x86_64 on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install PyYAML.x86_64.

Install PyYAML.x86_64 on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install PyYAML.x86_64 using yum by running the following command:

sudo yum -y install PyYAML.x86_64

How To Uninstall PyYAML.x86_64 on Amazon Linux 2

To uninstall only the PyYAML.x86_64 package we can use the following command:

sudo yum remove PyYAML.x86_64

PyYAML.x86_64 Package Contents on Amazon Linux 2

/usr/lib64/python2.7/site-packages/PyYAML-3.10-py2.7.egg-info
/usr/lib64/python2.7/site-packages/_yaml.so
/usr/lib64/python2.7/site-packages/yaml
/usr/lib64/python2.7/site-packages/yaml/__init__.py
/usr/lib64/python2.7/site-packages/yaml/__init__.pyc
/usr/lib64/python2.7/site-packages/yaml/__init__.pyo
/usr/lib64/python2.7/site-packages/yaml/composer.py
/usr/lib64/python2.7/site-packages/yaml/composer.pyc
/usr/lib64/python2.7/site-packages/yaml/composer.pyo
/usr/lib64/python2.7/site-packages/yaml/constructor.py
/usr/lib64/python2.7/site-packages/yaml/constructor.pyc
/usr/lib64/python2.7/site-packages/yaml/constructor.pyo
/usr/lib64/python2.7/site-packages/yaml/cyaml.py
/usr/lib64/python2.7/site-packages/yaml/cyaml.pyc
/usr/lib64/python2.7/site-packages/yaml/cyaml.pyo
/usr/lib64/python2.7/site-packages/yaml/dumper.py
/usr/lib64/python2.7/site-packages/yaml/dumper.pyc
/usr/lib64/python2.7/site-packages/yaml/dumper.pyo
/usr/lib64/python2.7/site-packages/yaml/emitter.py
/usr/lib64/python2.7/site-packages/yaml/emitter.pyc
/usr/lib64/python2.7/site-packages/yaml/emitter.pyo
/usr/lib64/python2.7/site-packages/yaml/error.py
/usr/lib64/python2.7/site-packages/yaml/error.pyc
/usr/lib64/python2.7/site-packages/yaml/error.pyo
/usr/lib64/python2.7/site-packages/yaml/events.py
/usr/lib64/python2.7/site-packages/yaml/events.pyc
/usr/lib64/python2.7/site-packages/yaml/events.pyo
/usr/lib64/python2.7/site-packages/yaml/loader.py
/usr/lib64/python2.7/site-packages/yaml/loader.pyc
/usr/lib64/python2.7/site-packages/yaml/loader.pyo
/usr/lib64/python2.7/site-packages/yaml/nodes.py
/usr/lib64/python2.7/site-packages/yaml/nodes.pyc
/usr/lib64/python2.7/site-packages/yaml/nodes.pyo
/usr/lib64/python2.7/site-packages/yaml/parser.py
/usr/lib64/python2.7/site-packages/yaml/parser.pyc
/usr/lib64/python2.7/site-packages/yaml/parser.pyo
/usr/lib64/python2.7/site-packages/yaml/reader.py
/usr/lib64/python2.7/site-packages/yaml/reader.pyc
/usr/lib64/python2.7/site-packages/yaml/reader.pyo
/usr/lib64/python2.7/site-packages/yaml/representer.py
/usr/lib64/python2.7/site-packages/yaml/representer.pyc
/usr/lib64/python2.7/site-packages/yaml/representer.pyo
/usr/lib64/python2.7/site-packages/yaml/resolver.py
/usr/lib64/python2.7/site-packages/yaml/resolver.pyc
/usr/lib64/python2.7/site-packages/yaml/resolver.pyo
/usr/lib64/python2.7/site-packages/yaml/scanner.py
/usr/lib64/python2.7/site-packages/yaml/scanner.pyc
/usr/lib64/python2.7/site-packages/yaml/scanner.pyo
/usr/lib64/python2.7/site-packages/yaml/serializer.py
/usr/lib64/python2.7/site-packages/yaml/serializer.pyc
/usr/lib64/python2.7/site-packages/yaml/serializer.pyo
/usr/lib64/python2.7/site-packages/yaml/tokens.py
/usr/lib64/python2.7/site-packages/yaml/tokens.pyc
/usr/lib64/python2.7/site-packages/yaml/tokens.pyo
/usr/share/doc/PyYAML-3.10
/usr/share/doc/PyYAML-3.10/CHANGES
/usr/share/doc/PyYAML-3.10/LICENSE
/usr/share/doc/PyYAML-3.10/PKG-INFO
/usr/share/doc/PyYAML-3.10/README
/usr/share/doc/PyYAML-3.10/examples
/usr/share/doc/PyYAML-3.10/examples/pygments-lexer
/usr/share/doc/PyYAML-3.10/examples/pygments-lexer/example.yaml
/usr/share/doc/PyYAML-3.10/examples/pygments-lexer/yaml.py
/usr/share/doc/PyYAML-3.10/examples/yaml-highlight
/usr/share/doc/PyYAML-3.10/examples/yaml-highlight/yaml_hl.cfg
/usr/share/doc/PyYAML-3.10/examples/yaml-highlight/yaml_hl.py

References

Summary

In this tutorial we learn how to install PyYAML.x86_64 on Amazon Linux 2 using yum.