Emerging dev-python/backports-ssl-match-hostname-3.4.0.2 on a amd64 prefix fils because of a double prefix problem: rm: cannot remove ‘/home/frb15/gentoo/var/tmp/portage/dev-python/backports-ssl-match-hostname-3.4.0.2/image/home/frb15/gentoo//home/frb15/gentoo/usr/lib/python2.7/site-packages/backports/__init__.py*’: No such file or directory * ERROR: dev-python/backports-ssl-match-hostname-3.4.0.2::gentoo_prefix failed (install phase): * (no error message) The corresponding code in the ebuild is python_install() { distutils-r1_python_install # main namespace provided by dev-python/backports rm "${ED}$(python_get_sitedir)"/backports/__init__.py* || die } And of course you do not need $ED when $(python_get_sitedir) is used, because it is already prefixed. In this case a single $D should be used.