ERROR: frontmatter 3.0.5 has requirement PyYAML==3.13, but you'll have pyyaml 5.1 which is incompatible

ERROR: frontmatter 3.0.5 has requirement PyYAML==3.13, but you’ll have pyyaml 5.1 which is incompatible.
Updating node packages…
INFO:bench.utils:yarn install
yarn install v1.22.0
[1/4] Resolving packages…
⠁ |DNS-response|: does not exist
node: …/deps/uv/src/unix/getaddrinfo.c:93: uv__getaddrinfo_translate_error: Assertion `!“unknown EAI_* error code”’ failed.
ERROR: There was a problem while creating frappe-bench
Do you want to rollback these changes? [Y/n]: y
Rolling back Bench “frappe-bench”

i need help

What often helps is to reset base packages to current with this:

apt-get update && apt-get upgrade


I read this document, but I don’t know how to fix this error

Either of these may resolve your package dependency conflict:

cd ${HOME}/frappe-bench
./env/bin/pip install PyYAML==3.13

or alternatively this:

bench setup requirements

For reference I have this:

frappe@ubuntu:~/frappe-bench$ ./env/bin/pip list packages | grep PyYAML
PyYAML 3.13
frappe@ubuntu:~/frappe-bench$ bench version
erpnext 12.4.3
frappe 12.2.1


On updating to
ERPNext: v12.7.0 (version-12)

Frappe Framework: v12.5.0 (version-12)
Error reappeared, had not occurred on previous updates. Not sure if regression.

ERROR: frontmatter 3.0.5 has requirement PyYAML==3.13, but you’ll have pyyaml 5.3.1 which is incompatible

There’s a conflict between PyYAML requirement fo frontmatter and frappe 12.5.0. Frontmatter requires 3.0.5 while frappe 12.5.0 requires 5.3.1.

@tonto @flexy2ky

the frontmatter dependency has been removed from frappe. It’s safe to re-generate your env and setup python requirements to drop dead requirements or simply uninstall it via bench pip uninstall frontmatter

1 Like

frontmatter uninstalled successfully. How do i regenerate my env?


From your bench directory root,

  1. rm -rf env
  2. bench setup env
  3. bench setup requirements --python

Reference: Bench Usage Docs

1 Like