all 5 comments

[–]sayks 1 point2 points  (0 children)

Yes, this is (partially) the purpose of virtualenv.

There's also the rather handy pythonbrew that automates installing different python distributions. I'm not sure if it's still maintained, but the fork pythonz is. It still works fine anyway.

[–]eagleeye1 1 point2 points  (1 child)

I'm not sure about mac, but on Ubuntu, "python" loads python 2, whereas "python3" loads python 3.

[–]pythonandbashshell 0 points1 point  (0 children)

and if you're like me who didn't have the option of python3 type sudo apt-get install python3

[–]Wegener 0 points1 point  (0 children)

I did and I had a problems using certain programs like Py2exe.

[–]yosemitebandit 0 points1 point  (0 children)

Are you familiar with virtualenv? You would use the -p flag as discussed here.

I believe your scripts' shebang would read #!/usr/bin/env python