Installation
FZ is a Python package that requires Python 3.8 or later. This guide covers different installation methods and optional dependencies.
Requirements
- Python: 3.8 or later
- Operating System: Linux, macOS, or Windows
- Optional: SSH access for remote calculators, pandas for DataFrame output
Installation Methods
From PyPI (Recommended)
Install the latest stable version from PyPI:
Or using pipx for isolated CLI tools:
From Source
Install the latest development version from GitHub:
The -e flag installs in editable mode, which is useful for development.
Using Virtual Environment (Recommended)
It's best practice to use a virtual environment:
# Create virtual environment
python -m venv fz-env
# Activate it
# On Linux/macOS:
source fz-env/bin/activate
# On Windows:
fz-env\Scripts\activate
# Install FZ
pip install -e /path/to/fz
Optional Dependencies
FZ has several optional dependencies for additional features:
SSH Support
For remote calculator execution via SSH:
DataFrame Support
For pandas DataFrame output (highly recommended):
All Optional Dependencies
Install everything at once:
Verify Installation
Test that FZ is properly installed:
You should see output like:
Google Colab
To use FZ in Google Colab, add this to your notebook:
Or install from GitHub for the latest development version:
Installing Plugins
FZ plugins are separate packages. Install them as needed:
FZ-Moret
FZ-MCNP
Other Plugins
Follow the same pattern for other plugins:
Development Installation
For FZ development, install additional dependencies:
# Clone the repository
git clone https://github.com/Funz/fz.git
cd fz
# Install with development dependencies
pip install -e ".[dev]"
# Run tests to verify
pytest tests/
Troubleshooting
Import Error
If you get ModuleNotFoundError: No module named 'fz':
- Verify installation:
pip list | grep fz - Check your Python path:
python -c "import sys; print(sys.path)" - Ensure you're using the correct Python environment
SSH Connection Issues
If SSH calculators fail:
- Install paramiko:
pip install paramiko - Test SSH manually:
ssh user@host - Check host keys are accepted
- Verify network connectivity
Permission Errors
On Linux/macOS, if you get permission errors:
System-Specific Notes
Windows
- Use PowerShell or Command Prompt
- Some shell calculators may require WSL or Git Bash
- Path separators are backslashes (
\) instead of forward slashes (/)
macOS
- May need Xcode Command Line Tools:
xcode-select --install - Use Homebrew to install Python if needed:
brew install python
Linux
- Use your distribution's package manager for Python:
- Ubuntu/Debian:
sudo apt install python3 python3-pip - Fedora/RHEL:
sudo dnf install python3 python3-pip - Arch:
sudo pacman -S python python-pip
- Ubuntu/Debian:
HPC Environments
For HPC clusters, you may need to:
- Load Python module:
module load python/3.9 - Install to user directory:
pip install --user -e . - Add to PATH:
export PATH=$HOME/.local/bin:$PATH
Docker Installation (Advanced)
Create a Dockerfile for containerized FZ:
FROM python:3.10-slim
# Install dependencies
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
# Install FZ
RUN pip install funz-fz
# Set working directory
WORKDIR /workspace
# Default command
CMD ["python"]
Build and run:
Next Steps
Once installed, proceed to:
- Quick Start Guide - Your first FZ calculation
- Core Concepts - Understand FZ fundamentals
- Examples - See FZ in action