0

I currently have python 3.3 installed on my windows 7 computer. i have the .exe set as an alias such that i can compile and run programs through cmd.

i'd like to install python 2.7 so that I can later turn my program into a .exe . How can I install python 2.7 on my computer, and then run it so that it compiles with 2.7 and not 3.3?

jlzizmor
  • 45
  • 7
  • 1
    Your question is a bit puzzling. Using Python 2.7 versus 3.3 has nothing to do with "turning your program into a .exe". Also, the two versions of Python are not totally compatible, so code that runs on 3.3 may not run on 2.7. Can you clarify what you're trying to accomplish? – BrenBarn May 25 '14 at 00:15
  • what i've already done when i installed python 3.3, is i modified the environment variable (see youtube.com/watch?v=L5t5U0XnSew#t=264) can i do this for python 2.7, and say, have a different keyword to launch? otherwise, how can i run a program in 2.7 with 3.3 in my path? – jlzizmor May 25 '14 at 00:34
  • When installing 2.7 on a system that already has 3.3, remember to disable updating file associations. You want to keep the .py extension associated with py.exe. – Eryk Sun May 25 '14 at 01:18
  • Python 3.3 also installs something called the [pylauncher](https://bitbucket.org/pypa/pylauncher) which is invoked via a `py.exe`. If you have another version of Python also installed, you can control which one is used by using command line arguments or via a shebang comment at the start of your scripts, like `#!/usr/bin/env python` as is common in linux os systems. – martineau May 25 '14 at 01:42

1 Answers1

0

If you have installed WinPython for Python 3.3 it also installs Python 2.7 but with a different name py.exe instead of the default python.exe.

yasouser
  • 5,113
  • 2
  • 27
  • 41
  • The 3.3 installer doesn't install 2.7. It installs the new py launcher, which defaults to running 2.7 if you already have that version installed. use `py -X.Y` to run version X.Y. – Eryk Sun May 25 '14 at 01:03