1597113 : pandas and pytables on jhub

Created: 2026-04-29T13:59:32Z - current status: new

Here’s the anonymized and summarized version of the query:


Summary

The user is inquiring about the recommended method to install PyTables (for HDF5 support with pandas) in JupyterHub on the Maxwell cluster. They are aware of the kernel creation instructions but seek clarification on: 1. Whether to use the JupyterHub-provided Python version to install ipykernel and create a local kernel. 2. If there are alternative or preferred approaches beyond running commands from within a notebook.


Solution

  1. Use a Virtual Environment The safest and most maintainable way to install additional packages like pytables is to create a virtual environment (e.g., using venv or conda) and install the package there. This avoids conflicts with system-wide or JupyterHub-provided packages.

Steps: - Load the desired Python module (e.g., python3.12): bash module load maxwell python/3.12 - Create and activate a virtual environment: bash python3.12 -m venv myenv source myenv/bin/activate - Install pytables and other dependencies: bash pip install pytables pandas - Install ipykernel and register the kernel with JupyterHub: bash pip install ipykernel python3 -m ipykernel install --name myenv --display-name "MyEnv (PyTables)" --user

  1. Alternative: Use --user Flag If a virtual environment is not desired, install pytables directly into the user space (though this may lead to dependency conflicts): bash <jhub-python> -m pip install pytables --user Then create the kernel as shown in the query.

  2. Verify Kernel Availability After installation, the new kernel (MyEnv (PyTables)) should appear in the JupyterHub launcher.

Key Notes

  • Avoid modifying system-wide Python: Always prefer virtual environments or --user installs to prevent breaking existing setups.
  • Check for existing kernels: Some Maxwell-provided kernels (e.g., Python 3.9) may already include pytables. Verify with: bash module load maxwell mamba mamba list | grep pytables

Sources

  1. Creating Jupyter Kernels (Maxwell Docs)
  2. Configuring Jupyter Kernels (Maxwell Docs)