Installing MultiPie

Installing MultiPie#

A Japanese version is here.

MultiPie can be installed from PyPI using pip on Python 3.12 or later.

Requirements#

  • Python ≥ 3.12

  • [Optional] A TeX Live environment is recommended for generating LaTeX and PDF files.

    • PDF files are generated by pLaTeX through ptex2pdf, so a Japanese TeX environment (pLaTeX and ptex2pdf) is required.

    • The following LaTeX packages are used: color, amsmath, breqn, graphicx, amssymb, bm, enumitem, braket, multirow, booktabs, longtable, caption. Some of them are not included in small installations such as TeX Live “basic”. You can check a package by, e.g., kpsewhich braket.sty.

  • [Optional] QtDraw is required for generating QtDraw (.qtdw) files.

Installation#

  1. Set up a Python environment

  • macOS

    • Install Homebrew (if not already installed).

    • Install Python:

      brew install python@3.13
      
    • Add Python (and LaTeX, if needed) path to your .bashrc or .zshrc:

      export PATH=/opt/homebrew/opt/python@3.13/libexec/bin:$PATH
      
    • If you use a virtual environment (e.g. ~/.venv), prepend its bin directory to PATH.

    • Restart your shell.

  • Linux

    • Install Python using your distribution’s package manager or from source.

    • Add Python (and LaTeX, if needed) path to your shell configuration file (e.g. .bashrc or .zshrc):

      export PATH=/path/to/python/bin:$PATH
      
    • If you use a virtual environment, ensure its bin directory appears before the global Python path.

    • Restart your shell.

  • Windows

    • Install PowerShell and Python by following the instructions at: https://microsoft.com/PowerShell

    • Ensure that Python path is added to your system PATH during installation.

  1. Install MultiPie. All required dependencies will be installed automatically:

    pip install multipie
    
  2. Install the visualization tool QtDraw:

    pip install qtdraw
    playwright install chromium  # on Linux, also run `playwright install-deps chromium`.
    
  3. (Optional) To compute the DOS by the optimized tetrahedron method ("dos_method": "tetrahedron" in the control file), install libtetrabz, which needs a C compiler:

    pip install "multipie[tetrahedron]"  # or pip install libtetrabz
    
  • Linux (Ubuntu 22.04.4 LTS on WSL2)

    • Add the following line to your .bashrc:

      export QT_QPA_PLATFORM=xcb
      
    • Install required system libraries:

      sudo apt update
      sudo apt upgrade  # optional, but recommended
      sudo apt install libxcb-cursor0
      

Shell Commands#

MultiPie provides the following command-line utilities:

  • mp_create [option] input1 input2 ...

    create models by the model input files.

  • mp_analyze [option] control1 control2 ...

    analyze the model by the control file.

See the Getting Started guide for examples.

Source Code#