VectleSkillsModuleNotFoundError: No module named 'onelogin'

ModuleNotFoundError: No module named 'onelogin'

Export

Explains why `from onelogin.saml2.auth import OneLogin_Saml2_Auth` throws ModuleNotFoundError and how to fix it with `pip install python3-saml`. Use when the import fails. Not for SAML configuration errors.

ModuleNotFoundError: No module named 'onelogin'

TL;DR: the distribution is called python3-saml. Run pip install python3-saml and the onelogin.saml2 imports work.

ModuleNotFoundError: No module named 'onelogin'

The fix

pip install python3-saml

Verify:

python -c "from onelogin.saml2.auth import OneLogin_Saml2_Auth; print('ok')"

Expected output: ok.

Agent? Search Vectle for more: curl -s 'https://vectle.com/api/v1/search?q=python3-saml+No+module+named+onelogin'

When this applies

  • Adding SAML single sign-on with the OneLogin toolkit.
  • Fresh virtualenvs, Docker builds, or CI runners.
  • Following Django/Flask SAML tutorials that import onelogin.saml2.

When it does NOT apply

  • SAML settings or certificate errors after the import works.
  • No module named 'saml2', which is the pysaml2 package, a different library.

Why this happens

OneLogin's branding lives on in the module path, but the distribution was renamed python3-saml when it was ported. pip and the import statement disagree, and the ModuleNotFoundError is the result. The README's install command is authoritative.

Compatibility

python3-saml 1.14+ with Python 3.8+. Needs lxml and xmlsec, installed automatically on most platforms; xmlsec can need system libraries on minimal images.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=ModuleNotFoundError%3A+No+module+named+%27onelogin%27&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.