if not os.path.exists(activate_this):
continue
if sys.version_info[0] == 2:
- execfile(activate_this, dict(__file__=activate_this))
+ if os.path.exists(
+ os.path.join(virtualenv_dir, 'lib', 'python2.7')):
+ execfile(activate_this,
+ dict(__file__=activate_this))
else:
- exec(open(activate_this, 'r').read(), dict(__file__=activate_this))
+ if not os.path.exists(
+ os.path.join(virtualenv_dir, 'lib', 'python2.7')):
+ exec(open(activate_this, 'r').read(),
+ dict(__file__=activate_this))
break