pyEuropePMC

Installation

This page covers installing pyEuropePMC from PyPI, choosing extras for optional features, setting up a development environment, and checking that the installation works.

Requirements

Install from PyPI

pip install pyeuropepmc

The base install includes search, full-text download, XML parsing, query building, deduplication, caching, rdflib, the pyeuropepmc command and the pyeuropepmc-mcp server.

Extras

Some features need packages that the base install leaves out. Install them as extras. Quote the argument so that shells such as zsh do not treat the brackets as a pattern:

pip install "pyeuropepmc[analytics]"
pip install "pyeuropepmc[analytics,visualization]"
Extra Installs Needed for
analytics numpy, pandas DataFrames and publication statistics
visualization matplotlib, numpy, pandas, seaborn Plots
export pandas, tabulate, xlsxwriter Excel and Markdown-table export
rdf nothing Kept for existing installs; rdflib, in the base install, writes JSON-LD itself
ui flask, tornado The claim-review web interface
signing cryptography Signed search logs
bibliography bibtexparser Reading and writing BibTeX
zotero pyzotero Zotero library sync
agentic jinja2, langchain, langchain-openai, langgraph, openai LLM agents and claim verification
semanticscholar semanticscholar The library-backed Semantic Scholar client
enrichment semanticscholar Enrichment clients
benchmark huggingface-hub Downloading the published parser benchmark datasets
standard the analytics, visualization and export packages, plus ipykernel, ipython, ipywidgets, jupyterlab, notebook, requests-cache and rich Everyday notebook work
all every package in the rows above All optional features

When a feature needs a package that is not installed, pyEuropePMC raises OptionalDependencyError with a message in this form:

The '<package>' package is required for <feature>.
Install it with: <install command>

RML mapping (pyeuropepmc.mappers.rml_rdfizer) also needs the rdfizer package, which no extra installs: pip install rdfizer.

Install from source

git clone https://github.com/JonasHeinickeBio/pyEuropePMC.git
cd pyEuropePMC
pip install -e .

Development setup

The development tools (pytest, ruff, mypy, pre-commit and others) are a PEP 735 dependency group named dev in pyproject.toml, not an extra, so installing pyEuropePMC with extras does not install them. Poetry installs the dev group by default:

git clone https://github.com/JonasHeinickeBio/pyEuropePMC.git
cd pyEuropePMC
poetry install --all-extras
poetry run pre-commit install
poetry run pytest

--all-extras gives the same packages as the main CI test job. The development guide also shows how to install with uv, as CI does.

Check the installation

import pyeuropepmc
from pyeuropepmc import SearchClient

print(pyeuropepmc.__version__)

with SearchClient() as client:
    count = client.get_hit_count("malaria")

print(f"Europe PMC is reachable: {count} results for 'malaria'")

Troubleshooting

Next steps