How to get YAML Python Library in PostgreSQL
This is a problem specific to EnterpriseDB. PostgreSQL does not ship Python, it merely ships a contrib module which your distribution is set to build against the system's Python. In the case of Windows, there is no Python for them to build against because there is no distribution. You can get any version of Python when you download "python" (more properly cpython). So instead, EnterpriseDB bundles a version of Python they provide as a distribution of PostgreSQL. Previously, that were bundling a statically linked Active State Python, now they're bundling cPython 3.3 (which they can dynamically link in). This is all from the docs here.

To configure your system to use EnterpriseDB Python though, you need to first follow a few steps. From the docs on configuration


  After installing Language Pack, you must set the following variables:
  set PYTHONHOME=C:\edb\languagepack-9.6\x64\Python-3.3
  
  Use the following commands to add Python, Perl and Tcl to your search path:

set PATH= C:\edb\LanguagePack-9.6\x64\Python-3.3\bin: C:\edb\LanguagePack-9.6\x64\Perl-5.20\bin: C:\edb\LanguagePack-9.6\x64\Tcl-8.5\bin:%PATH%

  
  After setting the system-specific steps required to configure Language Pack on Windows, restart the Advanced Server database server; see Section 5 for detailed information about restarting the server.


There are similar instructions provided for Linux and OSX

After you configure that pip and easy_install should work fine.