Common Installation Instructions

Installing the CSC tools is very easy on Ubuntu, somewhat easy on Mac OS X, and usually works on Windows.

Note

We don’t install from scratch very often, so we might accidentially break the installation process. If we broke it, let us know and we’ll fix it.

If you prefer a bunch of copy-and-paste commands, make a fresh Ubuntu virtual machine (such as with http://xvm.mit.edu/ for MIT students) and follow our instructions in http://etherpad.com/ep/pad/view/ro.SqbE5uAwk8QRNc90gRDZpQi0bY/latest

System-wide dependencies

Before you can install any of the CSC packages, you will need to have:

Note

You may not actually need a C compiler. ConceptNet depends on PyStemmer, which usually needs to be compiled, but if you’re only using English you don’t actually need it, since we implemented our own English lemmatizer. Building Divisi requires building a C library, SVDLIBC, but you don’t need to do that if you’re using a pre-built binary, such as the Divisi installer for Windows.

How to get these things depends on your environment:

Ubuntu GNU/Linux

On Ubuntu GNU/Linux, you can get the above with the command:

$ sudo apt-get install python-dev python-setuptools

Mac OS X

You should download Python from http://python.org. We do not recommend relying on the version of Python that came with your operating system. Just be careful not to get the versions confused! (Quit and reopen any Terminal windows you may have had open, just in case.)

To install Distribute quickly on a Mac, run these two lines in your terminal:

$ curl -O http://nightly.ziade.org/distribute_setup.py
$ sudo python distribute_setup.py

Windows

It’s significantly harder to get anything installed on Windows that’s not a setup.exe. That said, something like the following may work:

  • Install Python from http://python.org

  • You may have an easy_install script already in C:\Python25\Scripts\easy_install-2.5-script.py. If not: - Download the `distribute installer`_. - Run it from a command prompt:

    python distribute_setup.py
  • Follow the instructions below (remember IPython is optional), except don’t use sudo.

Optional: virtualenv

We like using virtualenv and its helper virtualenvwrapper. For more information on using that, see the developer docs.

In short, the upshot of using virtualenv is that you can omit the sudo part of all the easy_install commands.

Optional: IPython

To run the examples in this documentation, and to generally make it more pleasant to interact with Python and ConceptNet, you will probably want to install the ipython interpreter shell. Once you have Setuptools, you can type:

$ sudo easy_install ipython

You can exit IPython, like a normal Python shell, by typing Ctrl-D and pressing Enter.

Note

If you are using virtualenv, a system-wide install of IPython (from easy_install, a Debian/Ubuntu package, etc.) won’t use the virtual environment. (This is an IPython bug, I think.) An easy solution is just to run easy_install ipython (no sudo, as usual) within your virtual environment. You might need to run hash -r (for a bash shell) afterwards to make sure that typing ipython runs the newly-installed ipython.

Table Of Contents

Previous topic

Commonsense Computing Documentation

Next topic

ConceptNet API

This Page