Skip to content
Sam Howes edited this page Aug 29, 2016 · 19 revisions
  1. Learning to use the command line
  2. Installing Python
  3. Installing the VIS Framework

1. Learning to use the command line

The command line is an interface where you can type instructions, or "commands" in the form of text. Different operating systems have different programs for this purpose. On Mac OS X, this program is called Terminal. On Windows, you can use PowerShell or cmd.exe.

Whatever program you choose, this will serve as the interface between you and the VIS Framework. After installing VIS, you will be able to give VIS-specific commands, but there are some generic commands that you should learn first (these are the same for all operating systems):

  • pwd print working directory shows you which folder you are currently working from; files that are generated as results of an analysis (e.g., spreadsheets, image files) will be saved to the working directory
  • cd change directory allows you to move between folders; type cd followed by the name of the folder where you want to go (the folder name you specify must be one level up or down from the folder you are currently in), or type cd .. to move one level up from your current folder
  • ls list directory shows a list of the contents of the folder you are currently in
  • mkdir make directory allows you to create a new folder within your current folder; type mkdir followed by the name of the new folder you want to create
  • exit exit will exit the command-line interface

Top

2. Installing Python

Python is a programming language needed to run VIS. You can install it through your command line. A basic understanding of Python will be very helpful in conducting your own analyses using VIS and as you become more and more familiar with VIS, you will surely discover some new tricks in Python.

If you have little or no experience with Python, it is recommended that you take some time to (re)learn the basics. There are many helpful resources, including the Python documentation and Python's own Beginner's Guide to Python, as well as online tutorials.

Mac OS X

If you have a Mac computer, you do not need to download Python. Simply open your command line (Terminal), type python and press Return. If nothing happens, you may have to specify the exact location (i.e., file path) of Python on your machine, e.g., usr/local/python

Windows

If you are using Windows, you need to download Python first. Go to https://www.python.org/downloads/ and download Python 2.7.11. Do not download Python 3.5.1.

After downloading Python, open your command line (PowerShell), type python and press Enter. If nothing happens, you may have to specify the exact location (i.e., file path) of Python on your machine, e.g., C:\Python27\python.exe

Top

3. Installing the VIS Framework

The VIS Framework is a package for Python. Packages are software bundles that are written and run using Python. The VIS Framework is now available on the Python Package Index (PyPI) at python.org/pypi/vis-framework/. Once you have installed Python and become familiar with command lines, the easiest way to install the VIS Framework is with the command pip install.

With this command, you don't need to download anything from PyPI: Python can do it all automatically. Open your command line, type pip install vis-framework, and press Enter. If your computer tells you that pip is not recognized, you will have to specify the exact location (i.e., file path) of pip on your machine. If you have installed Python 2.7.11, then pip is located in C:\Python27\Scripts. Type C:\Python27\Scripts\pip install vis-framework and press Enter.

If you're feeling adventurous, you can navigate instead to the Scripts folder using the cd command, and then use pip install vis-framework from there. This is more work than typing the entire file path in a single command, but also good practice.

This installation can take several minutes, but it will save lots of set-up time by installing all of the necessary libraries (including music21 and pandas) at once. If your installation is successful, your command line will say something like this:

Installing collected packages: music21, six, python-dateutil, numpy, pytz, pandas, vis-framework
Running setup.py install for music21 ... done
Running setup.py install for vis-framework ... done
Successfully installed music21-2.1.2 numpy-1.11.1 pandas-0.16.2 python-dateutil-2.5.3 pytz-2016.6 six-1.10.0 vis-framework-2.4.1

Once this installation is complete, you are ready to begin your first analysis.

Top