Tool installation
Learning Objectives
After completing this lesson, learners should be able to:
Install the software that is required to execute the activities in this training material
Motivation
Provide instructions for installing the software required for this workshop. Please follow the instructions given by your trainer regarding which software you will need!
Concept map
Figure

Running bioimage analysis software
Hardware
Bioimage analysis software can be run either locally on your own computer or remotely on a cloud-based system. Each approach has its advantages and limitations:
Local (Your Computer)
- Pros:
- No internet connection required.
- Smooth interaction with screen, mouse, and keyboard.
- Cons:
- Limited hardware resources.
- Potential challenges with software installation.
Remote (Cloud-Based)
- Pros:
- Access to powerful, dedicated hardware.
- Preinstalled and ready-to-use software.
- Cons:
- Requires network access.
- Limited ability to modify or install additional software.
- Screen rendering may be slower due to network latency.
Sofware
Package managers
Package managers are software that can install libraries (packages) on your computer that are needed to develop and run bioimage analysis appllications. Prominent examples are maven
for managing Java and conda
for managing Python and other libraries; pip
is a relatively old and well-known package manager, specific to Python; we have heard good things about uv
as a modern Python package manager. Generally, the landscape of Python package managers is evolving and hard to keep track of.
Conda
- Conda is a software that you need to install on your computer
- Conda is a so-called package manager that will download software packages onto your computer
- Initially, conda was mainly for downloading python packages, thus the “snake” name, but now
conda
evolved to be a general purpose package manager - Now, there are many variants of conda (mamba, micromamba, miniforge, …); those will all install the same software packages on your computer, but will do this more or less fast and well
Example use with explanations
conda create -n skimage-napari-tutorial --override-channels -c conda-forge -c euro-bioimaging -c nodefaults python=3.10 napari=0.4.17 notebook matplotlib jupytext "scikit-image>=0.20" openijtiff "numpy<2"
conda create -n skimage-napari-tutorial
: Asksconda
tocreate
a new “environment” on your computer with the name (-n
)skimage-napari-tutorial
- This simply creates a folder on your computer called
skimage-napari-tutorial
into which conda will download stuff
- This simply creates a folder on your computer called
--override-channels -c conda-forge -c euro-bioimaging -c nodefaults
: Tells conda from where to download the software, a “channel”-c
is one place that hosts conda packages- ` -c nodefaults`: The reason to adding this was that the licensing of the default distribution channel for conda packages changed such that even academic institutions are not allowed anymore to use them
python=3.10 napari=0.4.17
: We require specific versions of those packages, the versions of other packages that don’t have the=
will be chosen automatically by conda such that, hopefully, everything is compatible- “scikit-image>=0.20” & “numpy<2”: Limits the range of versions to be above or below a certain version
scikit-image>=0.20
this was done here to make sure that the installation contains a nice new feature ofscikit-image
that was only available from version0.20
on and, back then, the version that conda would download by default was lower than thisnumpy<2
: Typically, if the so-called major version changes, e.g.1.9
goes to2.0
, there are “breaking changes”; this was also the case fornumpy
and, back then, many other packages that usenumpy
were not yet ready to use the new2.0
version leading to errors.
General notes:
- The specific software that is downloaded by an identical conda command will differ depending on your operating system and on your hardware (e.g. newer Mac computers have a different chip for which conda will need to download other packages than for older Mac)
- As a consequence, unfortunately, the same conda command may produce a working environment on some computers while it may not work on others
Activities
Install ImageJ
Install the ImageJ GUI and a scripting editor.
Show activity for:
Fiji
Fiji bundles the ImageJ GUI, a scripting editor and various plugins; additional plugins can be readily installed via so-called update sites.
IntelliJ
IntelliJ is an IDE for developing Java code. It can be used to develop and run ImageJ code.
- TODO
- TODO
Install skimage & napari
Install the python library skimage for image analysis and the napari viewer for image inspection.
Show activity for:
conda
Installation
Install a conda package manager
If you already have a conda package manager you can skip this step.
Important: If you cannot open the miniconda website, please install miniforge following the instructions; if you however can access miniconda please follow the below instructions.
- Install miniconda see also here. It is best to install as local user.
- Windows: the graphical installer works well. You can get it from the repo directly
- OSX: install using the
MacOS terminal installer
. This is the version that allows a local install. Install in the suggested path~/miniconda3
- Open a (new) terminal window
- Windows: Anaconda Prompt (Miniconda3), e.g. type
Anaconda
in the search bar- OSX: Open a
terminal
window. If conda is active you see(base)
left of the shell prompt. If you do not see(base)
you may have to manually activate the environment as described here by typingsource ~/miniconda3/bin/activate
Install the course environment
Within a terminal window execute
conda create -n skimage-napari-tutorial --override-channels -c conda-forge -c euro-bioimaging -c nodefaults python=3.10 napari=0.4.17 numpy notebook matplotlib jupytext scikit-image openijtiff napari-plot-profile
This will create an environment named
skimage-napari-tutorial
with the necessary packages for the course.Use the course environment
Activate the environment and open a notebook
- Create a directory called
skimage-napari-tutorial
(e.g. on your Desktop)- Open a terminal window (see above)
- Go into the above directory
cd skimage-napari-tutorial
conda activate skimage-napari-tutorial
jupyter notebook
orjupyter lab
Test the environment
Activate the environment and open a notebook (see above).
- Download test_installation_skimage_napari.py to the
skimage-napari-tutorial
directory.- Richt-click on
test_installation_skimage_napari.py
and choose Open with -> Notebook. You will get a notebook with preconfigured cells. Run the cells one by one (Run
button orShift-Enter
). The napari GUI will show twice the same image.- Create a new notebook
New > Python 3
- type following commands in a cell and execute the cell by pressing the
Run
button orShift-Enter
.# %% [markdown] # # Test python napari skimage install # %% # Instantiate the napari viewer import napari viewer = napari.Viewer() # %% # Read the intensity image from skimage.io import imread fpath = 'https://github.com/NEUBIAS/training-resources/raw/master/image_data/xy_8bit__two_cells.tif' image = imread(fpath) # %% # View the intensity image viewer.add_image(image) # %% # Read via OpenIJTIFF (OpenIJTiff.py must be in the same folder as the notebook path) from OpenIJTIFF import open_ij_tiff image_opentiff, axes, scales, units = open_ij_tiff(fpath) # View the intensity image viewer.add_image(image_opentiff)
Run code in the environment
Activate the environment (see above).
To run code either:
- (with package
jupytext
) create an empty file, e.g.my_code.py
in theskimage-napari-tutorial
directory. Copy the activity code to this file and save the file. From thejupyter
main landing page right-click on the file and choose Open with -> Notebook.- Create a new notebook
New > Python 3
and copy the code in the activity into the notebook.Troubleshooting
Ubuntu: Napari fails to show 3D viewer
We’ve encountered an OpenGL error for the napari 3D viewer on a Ubuntu machine when using the conda environment installed as described above.
This installation procedure got it to work (Note: not yet tested for all modules):
conda create -n skimage-napari-tutorial --override-channels -c conda-forge python=3.9 conda activate skimage-napari-tutorial pip install napari[all] pip install notebook pip install jupytext conda install --override-channels -c conda-forge -c euro-bioimaging -c nodefaults openijtiff
BAND
New BAND users
- Go to band.embl
- We recommend using Chrome or Firefox browsers. Please avoid using IE as it is not supported. Safari and Opera may be ok as well, but they are not thoroughly tested.
- Agree to the Terms of Use and Privacy Notice and click the “Login” button.
- We recommend Google authentication.
- After entering your credentials, check your emails for a confirmation email. It will typically take a maximum of 5 mins. Please also check your spam folder.
- Do not try to use the BAND before you receive the confirmation email.
- Please contact cbbcssupport@embl.de if you do not receive your confirmation email within 10 mins.
Once you receive your confirmation email, go back to band.embl.de and log in again.
You will be automatically redirected to the “Launch desktop” page after successful login.
- Please choose the following desired configurations (CPUs, Memory, GPUs, Screen resolution, and desktop running time).
- No. of CPUs = 1
- Memory (gb) = 2
- No. of GPUs = 0
- Resolution = your preference
- Time (days) = 1
Click “Launch Desktop”
- If you encounter an error launching a desktop, please contact us at cbbcssupport@embl.de.
- One user is only allowed to have 1 running desktop.
- Your desktop will be available in the ”Running Desktop” section if the launch is successful.
If this is your first time using the BAND, you may see a red error message appear after clicking “Go to Desktop”. If you see it, please simply stop the desktop and re-launch. The error is due to system and network limitations. It will go away, and the performance of your desktop will be optimal from your second desktop onwards.
If the “Go to desktop” button is greyed out, it means there are not enough resources available for your request. In this case, you have two options: 1) Stop your desktop and adjust your configurations. Lower the requested number of CPU, Memory, or GPU and launch again. 2) Wait until other users release their desktops so that more resources become available. The “Show Desktop” will automatically become clickable once there are enough resources.
- Click “Go to desktop” to view your desktop in a new browser tab.
- Click “SSH to Desktop” if you prefer a command-line interface.
Once your desktop appears in a new tab, you can access all the available software from the Application menu on the top left of your screen.
- After using your desktop, close the browser tab and click the “Stop desktop” button from the launch screen.
Existing BAND users
- Go to band.embl
- Click “Login” from the menu and then continue from step 5 above.
Launch skimage/napari
To execute the below steps you need to open a terminal window:
…and you also need to open an Application:
Open a Terminal and execute
- cd Documents # go to the Document folder - mkdir skimage-napari-tutorial # create a folder called skimage-napari-tutorial - cd skimage-napari-tutorial - wget https://neubias.github.io/training-resources/functions/OpenIJTIFF.py
Go to “Applications Places->Programming->JupyterLab”. Select ‘napari.tensorflow’ Kernel
Save the jupyter note-book file in skimage-napari-tutorial folder
File>Save Notebook As …> Documents/skimage-napari-tutorial/”FileName”.ipynb
We have napari from the menu. Or if you prefer to start napari within Jupyter, just type “%gui qt5” and ignore the warnings.
BAND tipps
- Do not run the “skill ” command, which may affect your running session and do not “scancel” the slurm job running your desktop session.
- Do not use any .bashrc in your home directory. It will cause the guacamole connection error.
- DO NOT store large files in /home, move or download large files to /scratch. If /home is full, BAND will break. THIS IS IMPORTANT.
- Refer to User guide for copy & paste instructions
- Use pure Google accounts or accounts that purely managed by Google. Account linking, for example, login with Hotmail with account linking to Google may not work.
- User data stored in /home and /scratch persists between desktop sessions. Stop desktop will not lose data.
- Recommend to log in to BAND at least once before the course. This is to give enough time to fix issues if there are any.
Install napari standalone app
Install napari standalone app
Show activity for:
desktop download
Open this link and navigate to Assets and click on the downloader according to your own system
Install Galaxy
Install the Galaxy instance.
Show activity for:
Start a local Galaxy
To setup a Galaxy server locally, we will first clone the Galaxy github repository, make a few small edits to the galaxy.yaml configuration file, and then start the server.
Clone the github repository with
release_23.2
branch.git clone -b release_23.2 https://github.com/galaxyproject/galaxy.git cd galaxy
Add yourself as admin user in
config/galaxy.yaml
cp config/galaxy.yml.sample config/galaxy.yml
open the
galaxy.yml
file with your favorite editor and edit the following line with your email address:admin_users: user@example.org .
Start Galaxy
sh run.sh
Galaxy will now install all its requirements, which may take a few minutes, when all is finished installing, you should see something like this in your screen:
Starting server in PID 9560.
serving on http://localhost:8080- Open Galaxy
- Open a web browser
- Navigate to
localhost:8080
to access GalaxyRegister an account on Galaxy using the email address you added to the
config/galaxy.yml
file. Once logged in, verify that you have a menu item namedAdmin
in your top menu bar.- Pull Galaxy tools from toolshed
- Click on the
Admin
menu.- On the left pane, click on
Install and Uninstall
under theTool Management
section.- Search for the tools via the ```Search Repositories`` text box on top of the main window.
- Click on the repository name to expand it.
- Click
Install
to install the tool into your local Galaxy.
Using Galaxy EU
Galaxy Europe is the biggest Galaxy instance in Europe and one of the biggest worldwide.
- Free registration
- Navigate to usegalaxy.eu
- Click
Log in or Register
from the top menu.- Click
Register here
to start registration process.- Fill in the required fields and click the
Create
button.- A confirmation email will be sent to your email address. Once the email is confirmed, you can start using the Galaxy Europe platform.
Follow-up material
Recommended follow-up modules:
Learn more: