In the ebuild environment, the PYTHONPATH variable cannot be trusted, since it may can break python. For example: $ PYTHONPATH=/usr/lib/python2.7 python3.3 Fatal Python error: Py_Initialize: Unable to get the locale encoding File "/usr/lib/python2.7/encodings/__init__.py", line 123 raise CodecRegistryError,\ ^ SyntaxError: invalid syntax Aborted We can handle this by using a known-safe PORTAGE_PYTHONPATH variable to override PYTHONPATH when calling python helpers.
This is fixed in git: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2d0815884f3fca7fae1838e2ab1086d5682d98b7
This is fixed in 2.1.13 and 2.2.0_alpha189.