How To Run Multiple Python Versions On Windows – Symbolic Links

One of my favorite things about Mac OS X is Homebrew.  It sets Python up in the most charming way where you can just type “python” for python 2.7 & “python3” for python 3.5.  I’m on Windows now though (sadly), and need both versions on my computer.  Yet when I used the official installers, I found I could only access Python 2.  Python 3.5 Solves this with comes with this Py Launcher, but there’s an alternate solution too

Symbolic Links (aka – Terminal Shortcuts):

You have to place the Symbolic Link in one of the folders in your Path*.  Personally, I just placed it in the same folder as the original Python Binaries.  Here’s the code:

> cd c:\bin
> mklink python25.exe c:\python25\python.exe

(Note: the first line is whatever folder you want the link to exist in.  The second line is mklink link_name.exe path_to_file_that_is_linked_to.exe)

In the example, this means you can now type “python25” into terminal & it will run python 2.5 … you can do this for any and all versions of python

*Your Path File is a list of all the directories that Windows checks when you type a command into your Terminal.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s