Installing and Using Sublime Text 2 and Anaconda Python

Anaconda Python is a collection of a number of very useful Python development packages as well as an interpreter. Sublime Text is a very popular development environment for Python programs.

For personal use on a laptop or desktop computer:

You can download Anaconda Python here and follow the instructions. Note for Windows users: you have the option to download a 32 or 64 bit version. Make sure you pick the same option for Sublime Text below. Mac users only have the 64 bit option.

Download Sublime Text 3 here. For Windows Users: If you are running 64-bit Anaconda Python, use the 64-bit link for Sublime Text in the Downloads section. Otherwise, just click the Windows link (this is the 32 bit version). If you are running OS X, click that link in the Downloads section. Note: don�t get a portable version if you are installing to a desktop or laptop computer.

Running Sublime Text 3 and Anaconda Python from a Windows flash drive (if you want to run Sublime during class):

The �free� version of Sublime Text 3 is an evaluation copy. We are not allowed to install it on our lab computers. If you would like to run Sublime in the lab from a flash drive, follow the instructions in this section. Obviously, if you bring your own computer to class, there is no need to do the following installation.

Please note: This installation will take up at least 2GB on your flash drive. Do yourself a favor and get a new one. If you try to stuff it into one that�s almost full, you will certainly suffer.

1.     Download Anaconda. Install it to a top-level folder (named Python for compatibility with my instructions) on your flash drive.

2.     Download the 32-bit version of the portable version of Sublime Text 3. This is a zip file�unpack it to the top level of your flash drive (the name of this folder is not important as long as it�s at the top level). Note�don�t use 64-bit Sublime; it�s incompatible with one of our Anaconda packages (numpy).

3. Use a text editor (like notepad) to create a DOS batch file in the folder that contains sublime_text.exe. Save it as sublime.bat. Add these 2 lines of text:

SET PATH=\python

sublime_text.exe

The first command adds the python folder on your flash drive to the system path so that Sublime will be able to find the Python interpreter on your flash drive. The second command starts Sublime from a command prompt so that it uses this path.

Starting and using Sublime and Python from your flash drive

For best results, start Sublime Text 3 by executing sublime.bat. You should now be able to run python code in the editor (assuming you have saved your edited file with a .py extension) using the key sequence CTRL-B.

What about Eclipse?

Eclipse is an editor that I�ve used a lot for my Java courses and I also use it happily for my own Java projects. In my opinion, however, Eclipse is a pain for Python programming. Let�s avoid it, if possible. If it proves to be impossible to ignore, I�ll provide detailed setup and usage instructions.