With upgrade from python-2.7 to python-2.7.1, something changes and virtualenv breaks. Upstream knows about this. virtualenv-1.5.1 that is in portage is unaffected. Reproducible: Always Steps to Reproduce: 1. install python 2.7.1 2. try to create virtual environment Actual Results: spotter@battleship ~ $ virtualenv axx New python executable in axx/bin/python2.7 Also creating executable in axx/bin/python Traceback (most recent call last): File "/home/spotter/axx/lib64/python2.7/site.py", line 67, in <module> import os File "/home/spotter/axx/lib64/python2.7/os.py", line 398, in <module> import UserDict File "/home/spotter/axx/lib64/python2.7/UserDict.py", line 83, in <module> import _abcoll File "/home/spotter/axx/lib64/python2.7/_abcoll.py", line 11, in <module> from abc import ABCMeta, abstractmethod File "/home/spotter/axx/lib64/python2.7/abc.py", line 8, in <module> from _weakrefset import WeakSet ImportError: No module named _weakrefset ERROR: The executable axx/bin/python2.7 is not functioning ERROR: It thinks sys.prefix is '/home/spotter' (should be '/home/spotter/axx') ERROR: virtualenv is not compatible with this system or executable Expected Results: spotter@battleship ~ $ virtualenv aaa New python executable in aaa/bin/python2.7 Also creating executable in aaa/bin/python Installing setuptools........................done. solution: 1. upgrade to virtualenv-1.5.1 2. apply patch (from https://bitbucket.org/ianb/virtualenv/issue/63/now-python27-requires-_weakrefset): --- a/virtualenv.py 2010-09-14 21:48:58.078562930 +0200 +++ b/virtualenv.py 2010-09-14 21:46:20.650769346 +0200 @@ -51,6 +51,8 @@ REQUIRED_FILES = ['lib-dynload', 'config if sys.version_info[:2] >= (2, 6): REQUIRED_MODULES.extend(['warnings', 'linecache', '_abcoll', 'abc']) + if sys.version_info[:2] >= (2, 7): + REQUIRED_MODULES.extend(['_weakrefset']) if sys.version_info[:2] <= (2, 3): REQUIRED_MODULES.extend(['sets', '__future__']) if is_pypy:
1. and 2. in solution are alternatives
You shouldn't mix stable versions (dev-python/virtualenv-1.4.9) with unstable versions (dev-lang/python-2.7.1).