Skip to content

Installation

Sander Roet edited this page Oct 19, 2023 · 20 revisions

General setup

Conda environments

PyTom comes with two conda environments, which can both be found in the environments folder:

  • environments/pytom_py3.8_cu10.1.yaml : python 3.8 with cuda 10.1
  • environments/pytom_py3.7_cu7.8.yaml : python 3.7 with cuda 7.8 (we have this environment for compatibility on our cluster)

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

cd pytom
conda env create -f environments/pytom_py3.8_cu10.1.yaml --name pytom_env
conda activate pytom_env
python3.8 setup.py install --prefix [CONDA_INSTALL_DIR]/envs/pytom_env

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.