SLiM Workshops: Hardware and Software Setup  



Computer hardware:

Workshops may provide machines for every attendee to use, if a computer lab is available; see the workshop announcement. If machines are not provided, every attendee must bring their own laptop, or previously arrange with the workshop host for a loaner laptop from the host institution. Machines should generally be Macs running macOS 10.15 (or later), or Linux boxes running a supported distribution (such as Ubuntu 18.04 LTS or 20.04 LTS), or Windows machines compatible with SLiMgui (64-bit, Windows 10/11 or later recommended), with at least 8 GB of RAM. Note that SLiMgui, not just SLiM, is required for the workshop, as we will be doing many interactive exercises that leverage SLiMgui. The workshop will not be terribly processor-intensive; fast machines are not essential. No special graphics hardware, etc., is needed.

Computer software:

If you are bringing your own machine, there are several software packages that need to be installed. Please install and test all software prior to the beginning of the workshop, and if you have installation issues, please resolve them before the workshop. With as many as 30 attendees at a workshop, I simply cannot begin the workshop by helping each person install the necessary software on their personal machine. I am happy to try to help with installation issues over email in the days preceding the workshop, but if the issue is with something other than SLiM/SLiMgui (Python, msprime, tskit, pyslim, etc.), I may be little help; you might instead want to pursue the issue with the authors of the software you're having trouble installing. In everything that follows, Terminal refers to the macOS application /Applications/Utilities/Terminal.app, or an equivalent command-line terminal application on your platform. The software needed:

• SLiM and SLiMgui (the current version). Complete installation instructions for all supported platforms can be found in chapter 2 of the SLiM manual; for macOS, Windows, and many Linux distributions an installer is available that makes it easy. Once you have installed it, test it with the following steps. (a) Launch the application SLiMgui.app (in /Applications/ on macOS) to ensure that it launches without errors. (b) Run Terminal and execute the commands:

slim -testEidos
slim -testSLiM

to ensure that the slim command-line tool runs correctly and passes its self-tests.

That's all that's needed for SLiM and SLiMgui, but to do various other things in the workshop – to work with tree-sequence recording in Python, in particular – other software is needed too. For users on Linux, I will just summarize by saying that you should install a reasonably recent Python 3 install (3.7 or later), the GNU Scientific Library (GSL), and the Python packages numpy, matplotlib, msprime, tskit, and pyslim; I imagine Linux users can figure out the details.

Mac users are often less used to installed Unix-based software, so here are more explicit instructions for macOS users. There are many different ways to install Python and Python packages. There is a built-in version of Python on macOS; if it is version 3.7 or later, on your system, you can use that. Otherwise you will need to install a newer version of Python, and that will require you to install a package manager first. So, in that event, you will need:

• The package installer of your choice – I use MacPorts, but Homebrew or conda should also work. For MacPorts, see the MacPorts installation page. MacPorts (and perhaps other package installers) requires that you have the Apple Developer Tools package and the Apple Command-Line Tools package installed first (see below); the necessary links are provided on the MacPorts page. Once the Apple tools are installed, installing MacPorts can be done with a double-click installer available on that page.

If you use the conda package installer, please see these notes on conda installation, written up by Ian Caldas (thanks Ian).

• As mentioned above, you may need the Apple Developer Tools and the Apple Command-Line Tools packages, for your package installer to work. The former package can be installed through the App Store as the Xcode package, and then you can run Terminal and execute xcode-select --install to install the command-line tools. Alternatively, you can get both packages from the Apple developer website; you will probably need an Apple login to proceed. Make sure that you install the correct version of the developer tools for your macOS version; the simplest solution is to be on the latest version of both macOS and the developer tools.

• Python 3.7 or later. Personally, I install Python 3.9 with MacPorts (sudo port install py39-python-install, sudo port install py39-pip), but using Homebrew or conda should also be possible. To test: run Terminal and execute the command python3. You should get an interactive Python prompt; press control-D to exit back to the shell. If you then execute python3 --version it should print a version number >= 3.7; if not, you need to upgrade to a more recent version.

• The GNU Scientific Library (GSL). This is required by the msprime Python package, and it may be pulled in automatically when you install msprime. If not, I install it with MacPorts (sudo port install gsl), but other methods may also work. If there is a problem with this installation, you will find out when you try to install msprime in the next step.

• The Python packages numpy, matplotlib, msprime, tskit, and pyslim. I install these with python3 -m pip install <package> --user, but there are various other installation methods. I install Python packages with --user because installing them system-wide does not work for me on macOS, but probably this is just some trivial issue with my path or permissions or some such. To test: run Terminal and execute the commands:

cd ~/Desktop
python3

At the Python prompt, type:

import numpy as np
import matplotlib as plt
import msprime, tskit, pyslim

If those commands all execute without errors, you are probably good, but one additional check is advised. Do not close the Terminal window, but go to Safari and download the file installTestPython.trees to the Desktop. Then switch back to Terminal, and – still at the interactive Python prompt – type the following commands one at a time:

ts = tskit.load("installTestPython.trees").simplify()
mutated = msprime.mutate(ts, rate=1e-7, random_seed=1, keep=True)
mutated.dump("installTestOUT.trees")

If everything is installed correctly, a new file named installTestOUT.trees should be created on the Desktop.

You should be running the current versions of all of these packages, to sync up with the current version of SLiM; these software packages work together closely, so versions are important. If you experience problems with your Python install, the usual solution is just to burn it to the ground and start over: uninstall/delete everything related to Python, then reinstall everything from scratch. Debugging installation/versioning issues is just not worth the time it takes.

Sorry if all this is complicated and confusing. I find it to be so also.