-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
manage.py: detect virtualenv2 for environments with py2 & py3 #39
Comments
Note: looks like several of the install scripts need to run "python2" binary as well. |
As a workaround, this is what I did on Arch Linux (but should be the same on any distro):
|
Thanks! |
Can you try changing line 36 of manage.py from |
Not quite.
Will get me part of the way there, but it fails during nodejs install:
Is there any way to skip the nodejs install? I already have it installed anyway and this is consistently where it fails. |
Can you try also editing the block of code around line 80 of manage.py to look like this
Note it's adding the two lines setting up new_env and then passing that to the sh cmd on the last line. This is needed because the nodejs build process expects the default python (i.e. first one on the path to be python 2.6 or 2.7) and it appears under your arch linux install it's python 3. Because we build an isolated environment with virtualenv we just need to get that into the front of the path before calling the nodejs build process to ensure we use the python from there. |
Hey, sorry it took me so long to get back to you. Other more pressing projects have taken up my time the last few months. I did eventually get this to work with the following (and your patch above): Instead of:
Used:
Inside the env:
Etc. following the startup guide. I guess we can consider this issue closed, though it might be nice to leave a note for future Arch Linux users. A simple alternative might be just to run a barebones Ubuntu LTS release in a virtual machine. Edit: nevermind this wasn't a complete solution. I'll get back with further comments tomorrow. Edit edit: notes above updated. Looks like it's all good now, yay! |
In at least some linux environments (e.g. Arch Linux), python 2.x and python 3.x run side by side, with the python 2 binary and tools suffixed with "2" (python2, virtualenv2, etc). Consider updating manage.py to detect virtualenv version number, and look for virtualenv2 executable if virtualenv is not found or is from python 3.x.
I made a simple change from "virtualenv" to "virtualenv2" to fix this in the meanwhile but it'll break every other environment so I won't do a pull request. I'm not experienced enough in python to do it the "smart" way described above.
The text was updated successfully, but these errors were encountered: