Skip to content

Installation

Sander Roet edited this page Aug 21, 2024 · 22 revisions

General setup

Conda environments

PyTom comes with multiple conda environments, which can both be found in the environments folder. We recommend to use the environments/pytom_full.yaml, as the others are present for legacy purposes

Only in case you do not have miniconda3 (or 2) installed: bash installMiniconda.sh

cd pytom
conda env create -f environments/pytom_full.yaml --name pytom_env
conda activate pytom_env
python setup.py install --prefix $CONDA_PREFIX

Prerequisites

PyTomGUI is designed to run on linux systems, but can also be installed on MacOSX. It requires the following software package to be installed:

General packages

  • python (>= 3.7 )
  • openmpi (should be CUDA-aware for GPU acceleration)
  • fftw3
  • gcc (version 5-7)
  • libxml2
  • swig (>= 3.0.12)

Python Packages

  • numpy
  • scipy
  • boost
  • lxml
  • mrcfile
  • tqdm
  • scikit-image
  • matplotlib
  • cupy (Optional for GPU acceleration)

Optional Software Packages used by GUI

  • PyQt5
  • pyqtgraph
  • motioncor2 ( >=1.2.1)
  • imod (=4.10.25)

Setting up on WSL2

(Tested on Ubuntu 20.04 on WSL2. Computers needs Windows 10 pro with the HyperV option.)

Start by following the default installation intructions for installing on Linux using Conda environments.

Using the GUI on WSL2

You need to run an x11 server on Windows and forward it to WSL2. We tested it with VcXsrv X server.

We followed this guide for setting up the connection: x11 forwarding on WSL2

The general steps are:

  • Add the following to your ~/.bashrc:
    export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0
    export LIBGL_ALWAYS_INDIRECT=1
  • Enable Public Access on your X11 server for Windows (important to add the instruction from the guide here to limit full public access for security)
  • Add a separate inbound rule for TCP port 6000 to the windows firewall in order to allow WSL access to the X server, as described by the wsl-windows-toolbar-launcher people.
  • When launching the VcXsrv server its important to check the box to Disable Access Control.
Clone this wiki locally