Skip to content
Jamie Norrish edited this page Dec 5, 2017 · 17 revisions

The following notes provide some guidance for installing Python and other packages that tacl depends on. Once Python is installed, the best approach is to run pip install tacl, which will install tacl and its Python dependencies; where there is some problem with that, hopefully these notes will be useful.

Mac OS X

To install Python 3, follow the instructions at http://docs.python-guide.org/en/latest/starting/install3/osx/#install3-osx. When this is done, pip (or sudo pip) can be used to install tacl (pip install tacl).

An alternative set of instructions were provided by a Mac OS X user (using 10.9):

  1. Download and unpack the tacl code at https://github.com/ajenhl/tacl/archive/master.zip
  2. Install the latest version of MacPorts: https://www.macports.org/install.php
  3. Install Xcode and the Xcode Command Line Tools.

In a Terminal, run the following:

  1. sudo xcodebuild -license (agree to Xcode license)
  2. sudo port selfupdate (update MacPorts, if it is an old installation)
  3. sudo port install python34 (install Python3.4 via MacPorts)
  4. sudo port select --set python python34 (set Python3.4 as the default version)
  5. sudo port install py34-lxml (install lxml)
  6. sudo port install py34-pandas (install pandas)
  7. sudo port install py34-biopython (install biopython)
  8. sudo port install py34-six (install six, due to the MacPorts version of dateutils not pulling in this requirement)
  9. cd [directory where tacl was unpacked to]
  10. sudo python setup.py install (install tacl)
  11. tacl -h (get the main tacl help)

If the last step produces an error that the tacl command was not found, this is likely due to its location not being in the PATH environment variable. Look for a line such as "copying build/scripts-3.4/tacl -> /opt/local/Library/Frameworks/Python.framework/Versions/3.4/bin" in the output of the "sudo python setup.py install" command; the destination directory listed there needs to be added to the PATH. This can be done by following the instructions at http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/. After that is done (and remember that you need to reload your .profile, or open a new Terminal, first), tacl -h should print out the basic usage information for tacl, and you are ready to start using the program!

Windows

  1. Download and install the latest version of Python 3 from http://www.python.org/. If your system is 64-bit, download the AMD64/x64 installer. During installation, select the "Add python.exe to Path" feature to be installed.

  2. Unfortunately, most of tacl's dependencies (and their dependencies) have non-Python components that are frustratingly difficult to build from source on Windows. Fortunately, sometimes precompiled binaries are made available. Hopefully you can find installers for your version of Python and processor (32-bit or 64-bit) at http://www.lfd.uci.edu/~gohlke/pythonlibs/. Download and install, in order, lxml, NumPy, pandas, and biopython.

    The files at the above site include elements indicating which version of Python they are built for, and which architecture (32-bit or 64-bit). "cp34" indicates that a file is for Python 3.4, for example, and win_amd64 that the file is for 64-bit machines.

    Note that the Visual C++ redistributable package, linked in the introductory paragraphs of that page, is also required, again in the version that matches the installed version of Python and the architecture of the operating system.

  3. Open a shell window (cmd).

  4. After downloading the files in step 2, install them using the command pip, which should have been installed along with Python: pip install <path to file>

  5. Run pip install tacl.

  6. tacl can then be run from the shell window with the command tacl -h (which outputs a help page).

Clone this wiki locally