Installing the binaries (64-bit only)
- Download this zip file.
- Drag and drop the downloaded and unzipped folder to the location of your choice, and rename it "Open Ephys."
- Open a terminal and set your working directory to the Open Ephys folder.
Type "sudo cp 40-open-ephys.rules /etc/udev/rules.d", then type your password.
- Type "service udev restart" on Ubuntu/Debian or "sudo udevadm control --reload-rules" on Fedora/CentOS. These last two steps will allow your computer to communicate with the Open Ephys acquisition board.
- Double-click the "open-ephys" executable (or type "./open-ephys" in the terminal) to run the application.
Building from source (32-bit or 64-bit)
Get the code from GitHub
Create a GitHub account if you haven't already.
- While logged into your account, go to https://github.com/open-ephys/plugin-GUI and click the "Fork" button in the upper right. You now have your own copy of the GUI repository. Any changes you make will only affect this copy. (More info on forking here.)
- Make sure you have git installed (instructions here).
- Open a terminal and set your working directory to where you'd like the code to be saved. We recommend creating a directory dedicated to all your coding projects, such as ~/Programming.
- Type "git clone https://github.com/yourusername/plugin-GUI.git", where "yourusername" is replaced by your actual GitHub user name. This will download all the code from the repository onto your computer.
Install dependencies
- Install the Linux dependencies by running "sudo ./install_linux_dependencies.sh" in the Resources/Scripts folder.
- From the same directory, type "sudo cp 40-open-ephys.rules /etc/udev/rules.d".
- Type "sudo service udev restart" on Ubuntu/Debian or "sudo udevadm control --reload-rules" on Fedora/CentOS. These last two steps will allow your computer to communicate with the Open Ephys acquisition board.
Some plugins require additional dependencies to build and work. Specifically, in the case of the ones supplied by default:
- NetworkEvents and EventBroadcaster require the ZeroMQ library
- KWIKFormat requires an HDF5 library version greater than 1.8.12 and less than 1.8.21, so you'll like have to build this from source, rather than using a package manager
This section describes the steps needed to install those dependencies on your system.
Install ZeroMQ library
You will need to install the ZeroMQ library, either from a PPA or from source.
Installing from a PPA. Here are the terminal commands needed to install from a PPA. Note that we specify version 3 of the API ("libzmq3"), which is necessary for the current version of the GUI. These commands work on Ubuntu-like distributions but may need to be modified for others.
sudo add-apt-repository ppa:chris-lea/zeromq
sudo apt-get update
sudo apt-get install libzmq3-dbg libzmq3-dev libzmq3
Installing from source. Alternatively, you can build from source using the instructions from http://zeromq.org/intro:get-the-software, copied below:
- Make sure that libtool, pkg-config, build-essential, autoconf, and automakeare installed.
- Check whether uuid-dev package, uuid/e2fsprogs RPM or equivalent on your system is installed.
- Unpack the ZeroMQ .tar.gz source archive. (from here)
- Run ./configure, followed by make.
- To install ZeroMQ system-wide run sudo make install.
- On Linux, run sudo ldconfig after installing ZeroMQ.
Install the HDF5 library
In order to compile the KWIKFormat and NWBFormat plugins, you need to have the HDF5 library installed. HDF5 is a file format that's optimized for scientific data sets. It is extremely powerful, and offers many advantages over traditional binary formats. The GUI now allows users to save data in the Kwik format and NWB format which are based on HDF5.
The plugin requires you to use a specific version of the HDF5 library (≥1.8.12 and <1.8.21).
To install HDF5 from source, download the source from this page (version 1.8.20 recommended) and follow the instructions in the INSTALL file. Briefly:
- Unzip the source code
In the source code directory, run configure by typing the following:
./configure --prefix=/usr/local/hdf5 --enable-cxx
- Run 'make' to compile the code and then 'make check' to check for errors.
- Run 'sudo make install' and 'sudo make check-install' to install.
Assuming this completed without errors, you're ready to start building the Open Ephys GUI. You'll need to provide the location of the libraries you've just installed by setting the following environment variables before attempting to build the GUI.
export CPLUS_INCLUDE_PATH=/usr/local/hdf5/include
export LIBRARY_PATH=/usr/local/hdf5/lib
export LD_LIBRARY_PATH=/usr/local/hdf5/lib
Build the Open Ephys GUI
Change your current working directory to Builds/Linux. The following steps could be executed by the script "setup.sh" in this directory, but we recommend following these steps and typing the commands manually, in case you encounter any errors.
Type "make" to build the main application. If this fails, you are probably missing dependencies (see above, and please let us know if any dependencies are missing from the instructions).
- Type "make -f Makefile.plugins" to build all plugins.
- To clean the plugin build space, type "make -f Makefile.plugins clean"
- To compile just a specific plugin, type "make -f Makefile.plugins <NameOfThePluginFolder>"
- Only those plugins that have a Makefile file inside their source directory will be built
- If the above steps are successful, there will be a compiled binary at Builds/Linux/build/open-ephys. Note: this file may incorrectly be named 'open-ephys.so'; if so, it's best to rename it to 'open-ephys'.
- You can optionally install the open-ephys binary to a directory on your path so that it can be started from any directory by typing "sudo ln -s -f build/open-ephys /usr/bin/open-ephys"
Now you can both use the GUI and make changes to the source code. We recommend reading through the developer documentation before doing so.
Any changes you commit can be synced with your GitHub repository by typing "git push origin master" from any directory inside your project. If you change something that you think would be useful for others, you can submit a pull request to the Open Ephys version of the GUI.
Troubleshooting
- If you're building the library from source, make sure you run "./configure" with the "--enable-cxx" flag. The default is to just install the C libraries.
- If you get an error message about "‘class H5::H5File’ has no member named ‘attrExists’", then you are linking to a version of HDF5 that is 1.8.11 or lower. See above for the section about installing HDF5 from source.
- Make sure the HDF5 header and library files are found in directories that are in your PATH and LD_LIBRARY_PATH, respectively. If this doesn't sound familiar to you, you should read up on Linux environment variables.
- If adding header and library files folder to PATH and LD_LIBRARY_PATH doesn't work, try following steps:(assume your hdf5 is installed to "/usr/local/hdf5")
$ sudo gedit /etc/environment
Then add two lines at the end of the file:
CPLUS_INCLUDE_PATH="/usr/local/hdf5/include"
LIBRARY_PATH="/usr/local/hdf5/lib" - If you're getting a libudev.so.0: cannot open shared object file error, you need to install libudev0_175-0. In current ubuntu verisons this is not available with apt-get, but you can dowload it manually and install with sudo dpkg -i libudev0_175-0ubuntu9_amd64.deb. See also https://askubuntu.com/questions/288821/how-do-i-resolve-a-cannot-open-shared-object-file-libudev-so-0-error