Installing fsleyes on Debian based systems

Posted on : 4th Sep 2019

FSLeyes (pronounced fossilise) is the new FSL Image Viewer. The available documentation and public releases on PyPi have a lot of depreciated stuff that makes it hard to install. 


Installing dependencies

Before proceeding any furthur, make sure you have the following packages installed : 

Install the above packages by running the following command : 

sudo apt install libwebkit2gtk-4.0-dev libjpeg-dev libtiff-dev libgtk2.0-dev libsdl1.2-dev freeglut3 freeglut3-dev libnotify-dev libgstreamerd-3-dev


Creating a safe environment

Although the documentation mentions that fsleyes supports Python 2.7, 3.5, 3.6. I found it using a mix of depreciated and recent updates as dependencies -- breaking the installation .

Let's stick to Python2.7 for now. Create a virtualenv for py2.7 using the following command : 

virtualenv -p python2.7 env
source env/bin/activate


Getting to the good stuff

Once you are done with the virtual environment, it's time to install the good stuff. fsleyes uses wxpython toolkit for GUI on linux systems. 
Install both with following command : 

pip install wxpython fsleyes

Try running fsleyes through your command line now, it will give you errors regarding queue, request and abc modules not found. 

To fix the queue errors 

import queue
import Queue as queue


To fix abc errors 

import collections.abc as abc
import abc


To fix request errors 

import urllib.request as request
from urllib2 import urlopen as request


aaand, you are done. 

© 2021, All Rights Reserved · Vipin Joshi