PyYAML with Python 3.x
Question: I've a problem using the _yaml_ (PyYAML 3.11) library in Python 3.x. When I
call `import yaml` I get the following error:

    
    
    Python 3.4.3+ (default, Oct 14 2015, 16:03:50) 
    [GCC 5.2.1 20151010] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import yaml
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home/mlohr/python-libs/yaml/__init__.py", line 2, in <module>
        from error import *
    ImportError: No module named 'error'
    

`error` is a file located in the yaml directory, but the `__init__.py` from
yaml does use absolute imports. I guess that's the problem, but I#'m not sure.

In <http://pyyaml.org/wiki/PyYAMLDocumentation#Python3support> is a short path
about (supposed) Python 3 support, so I'm not sure if I'm using it the wrong
way.

The same issue occurs (that's the way I found the problem) when using Python 3
with python scripts using yaml.

With Python 2.7 and 2.6 it works without problems.

Any idea/suggestion how to get that working?


Answer: It would seem that you're either using an old version of `PyYAML` after all or
using a Python2 installation of `PyYAML` with Python3 as suggested in an
[other answer](http://stackoverflow.com/a/36055462/2681632), because in your
traceback we see

    
    
    from error import *
    

which is not an absolute import. You should either upgrade, reinstall `PyYAML`
with Python3 sources in your environment, or create a new environment for
Python3 packages.

