I just tried to emerge dev-python/mechanize on a new system and it fails: >>> Emerging (3 of 15) dev-python/mechanize-0.2.5 * mechanize-0.2.5.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking mechanize-0.2.5.tar.gz to /var/tmp/portage/dev-python/mechanize-0.2.5/work >>> Source unpacked in /var/tmp/portage/dev-python/mechanize-0.2.5/work >>> Preparing source in /var/tmp/portage/dev-python/mechanize-0.2.5/work/mechanize-0.2.5 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/dev-python/mechanize-0.2.5/work/mechanize-0.2.5 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/dev-python/mechanize-0.2.5/work/mechanize-0.2.5 ... * Building of dev-python/mechanize-0.2.5 with CPython 2.7... python2.7 setup.py build -b build-2.7 Traceback (most recent call last): File "setup.py", line 92, in <module> main() File "setup.py", line 70, in main import setuptools ImportError: No module named setuptools * ERROR: dev-python/mechanize-0.2.5 failed (compile phase): * Building failed with CPython 2.7 in distutils_building() function * * Call stack: * ebuild.sh, line 85: Called src_compile * environment, line 4977: Called distutils_src_compile * environment, line 1162: Called python_execute_function 'distutils_building' * environment, line 3361: Called die * The specific snippet of code: * die "${failure_message}"; * * If you need support, post the output of `emerge --info '=dev-python/mechanize-0.2.5'`, * the complete build log and the output of `emerge -pqv '=dev-python/mechanize-0.2.5'`. * The complete build log is located at '/var/tmp/portage/dev-python/mechanize-0.2.5/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-python/mechanize-0.2.5/temp/environment'. * Working directory: '/var/tmp/portage/dev-python/mechanize-0.2.5/work/mechanize-0.2.5' * S: '/var/tmp/portage/dev-python/mechanize-0.2.5/work/mechanize-0.2.5' It needs dev-python/setuptools (it wasn't on my machine?), manually emerging it and re-emerging dev-python/mechanize fixes the problem. Reproducible: Always Steps to Reproduce: 1. On a new machine, install dev-python/mechanize 2. After it fails, install dev-python/setuptools 3. Reemerge dev-python/mechanize and it succeeds.
*** This bug has been marked as a duplicate of bug 405697 ***