The following sections describe how to install the Tethne package and TethneGUI. Since Tethne is under active development, we’re making improvements and adding features all the time. It’s a good idea to stay on top of new releases. To get notifications about new releases, you should watch our GitHub repository.
Tethne is under active development, so you will most certainly run into bugs and hiccups. If you run into trouble, please create a new issue in our issue tracker. This will help us to hunt down problems, and will ensure that you get updates as we work to solve those problems.
Tethne requires the following software and packages.:
We recommend installing Anaconda, which will install Python, Numpy, NLTK, and a variety of other useful libraries. Installation instructions for Anaconda can be found here. This may be a good idea even if you already have Python installed on your system.
Tethne requires Python 2.7; Python 3 is not fully backwards-compatible, and Tethne will not work properly with that version. If you installed Anaconda, Python 2.7 should already be installed.
You may already have Python installed on your system. To find out, open a new command-line window. On Mac, find Terminal in Applications > Utilities; on Windows, go to Start > All Programs > Accessories > Command Prompt. Type in python and press enter. If Python is installed, the command-line interpreter should start:
$ python
Python 2.7.5 |Anaconda 1.6.1 (x86_64)| (default, Jun 28 2013, 22:20:13)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Note that the version number (Python 2.7.5) is listed in the first line when the interpreter starts. If you have Python 2.7.x, you’re good to go.
If Python is not installed, or you have the wrong version of Python, you can find the latest versions of Python here.
Windows users should use the 32-bit version of Python. Look for the Windows x86 MSI Installer. For details about installing Python on Windows, see Installing Python on Windows.
NumPy stands for Numerical Python. NumPy is a Python library that provides functionality for scientific computing.
If you installed Anaconda, NumPy should already be installed. Otherwise, you can find an installer for your operating system on the NumPy SourceForge project. Mac users should download and install numpy-1.8.0-py2.7-python.org-macosx10.6.dmg. Windows users should download and install numpy-1.8.0-win32-superpack-python2.7.exe.
NLTK stands for Natural Language ToolKit. If you installed Anaconda, NLTK should already be installed. For installation instructions, see the NLTK documentation.
NetworkX is a Python package for network analysis. The easiest way to install NetworkX is to use pip. pip installs Python packages from the Python Package Index. You will need to be connected to the internet in order for pip to successfully download and install packages.
First, check to see whether you have pip installed. Open the command prompt, and enter pip --version. If pip is installed, you should see something like:
$ pip --version
pip 1.3.1 from /anaconda/lib/python2.7/site-packages (python 2.7)
Otherwise, you’ll need to install pip. See this installation guide.
Once pip is installed, install NetworkX by entering the following in the command prompt:
$ sudo pip install networkx
You will be prompted to enter your password.
If all goes well, you should be able to import NetworkX in Python:
$ python
Python 2.7.5 |Anaconda 1.6.1 (x86_64)| (default, Jun 28 2013, 22:20:13)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import networkx
>>>
Tethne is available via the Python Package Index. You can install the latest release using pip
$ sudo pip install tethne
Password:
Downloading/unpacking tethne
Downloading tethne-0.3.0-alpha.tar.gz (61kB): 61kB downloaded
Running setup.py egg_info for package tethne
Installing collected packages: tethne
Running setup.py install for tethne
Successfully installed tethne
Cleaning up...
Alternatively, you can find the latest release of Tethne in our GitHub repository.
Download the source code.
Unpack the .zip/.tar.gz archive (e.g. tethne-0.3.1-alpha.zip). This should create a new folder, e.g. tethne-0.3.1-alpha.
Open the command prompt, and navigate to the folder where you unpacked Tethne. For example, if you unpacked Tethne in your Downloads folder, use:
$ cd ~/Downloads
If you have pip installed, use:
$ sudo pip install ./tethne-0.3.1-alpha
(change tethne-0.3.1-alpha to reflect the release that you downloaded).
If you don’t have pip, you can use:
$ sudo python ./tethne-0.3.1-alpha/setup.py install
If Tethne is installed successfully, you should be able to import it in the Python interpreter:
$ python
Python 2.7.5 |Anaconda 1.6.1 (x86_64)| (default, Jun 28 2013, 22:20:13)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tethne.readers as rd
>>>
To make using Tethne from the command-line a bit easier, create a permanent alias.
Mac:
Add the following line to ~/.bash_profile:
alias tethne='python [TETHNE PATH]'
$ python
Python 2.7.5 |Anaconda 1.6.1 (x86_64)| (default, Jun 28 2013, 22:20:13)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tethne
>>> tethne.__file__
'//anaconda/lib/python2.7/site-packages/tethne/__init__.pyc'
>>>
$ tethne
Must specify --dataset-id
A demonstration graphical user interface was created for teaching purposes only. This is not intended for extensive use. It provides a very basic interface to the Tethne command-line workflow.
TethneGUI comes bundled with most of the things that it needs to run. On Windows systems, however, you will need to install NumPy independently. See NumPy, above.
You can find the most recent build of the TethneGUI on the Neotoma phenax SourceForge repository.
Once TethneGUI loads, you should see a window that looks like this: