Skip to content
This repository was archived by the owner on Nov 13, 2017. It is now read-only.

Force python 2.6 on install (compatibility with 2.7 is an issue in virtualenv) #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jkliff
Copy link

@jkliff jkliff commented May 5, 2012

Please consider the following fix for the issue described below:

On a clean clone, ./install fails as follows.

% ./install.sh
installing theory prerequisites and Python virtual environment to /home/john/Desktop/src/theory//env/
New python executable in /home/john/Desktop/src/theory//env/bin/python
Traceback (most recent call last):
File "/home/john/Desktop/src/theory//env/lib/python2.7/site.py", line 67, in
import os
File "/home/john/Desktop/src/theory//env/lib/python2.7/os.py", line 398, in
import UserDict
File "/home/john/Desktop/src/theory//env/lib/python2.7/UserDict.py", line 83, in
import _abcoll
File "/home/john/Desktop/src/theory//env/lib/python2.7/_abcoll.py", line 11, in
from abc import ABCMeta, abstractmethod
File "/home/john/Desktop/src/theory//env/lib/python2.7/abc.py", line 8, in
from _weakrefset import WeakSet
ImportError: No module named _weakrefset
ERROR: The executable /home/john/Desktop/src/theory//env/bin/python is not functioning
ERROR: It thinks sys.prefix is '/home/john/Desktop/src/theory' (should be '/home/john/Desktop/src/theory/env')
ERROR: virtualenv is not compatible with this system or executable

Narrowing it down, the issue lies in a bug on virtual env (https://bugs.launchpad.net/ubuntu/+source/python-virtualenv/+bug/662611) in which runnig it from py2.7 is the culprit.
Case in point, on my system python 2.7 is indeed the default one.

The issue is easily solved forcing the python which executes go-pylons to be 2.6.

Probably this should check more resiliently for the version of the python executable on different environments, but as far as it goes with typical aliasing of python versions (python2.5, python2.6, etc), this works properly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant