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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.