Q:

virtualenv gets wrong python?

files from the Grinberg flask tutorial on git won't work for me locally unless I add #!/usr/bin/env python to the first line - but I thought the default python for my xubuntu apt-get installation of virtualenv was supposed to be python 2.7 ?
Can I invoke virtualenv in a way that ensures the right python gets used so I don't have to add the shebang to every file I checkout from git?
I also have to chmod 755 these files before they work in my local virtualenv.  
Am I causing these problems somehow? Is there a way to avoid having to change the files every time?

A:

When using env, that essentially means the first python instance in your PATH will be used.
What is the output when you do which python? Which version is virtualenv using instead?
It may be that you're using the system python instead of the virtualenv without that change.
How are you actually invoking the scripts?
If you invoke them directly from bin/python in the virtualenv environment you want to use, then it should use that python.
Otherwise, if you just want to use python without a path, it's best to source the activate script in the virtualenv you want to use.

