--- id: pyquaternion version: "0.9.9" license: MIT license_treatment: permissive maintenance: active --- # pyquaternion — A fully featured, pythonic library for representing and using quaternions. License: permissive · Maintenance: active · Downloads: 3.9M/mo ## What it is and what it does Pyquaternion is a pure-Python library for working with quaternions—a mathematical representation of 3D rotations and orientations. It wraps numpy and provides a Pythonic interface for creating quaternions from axes and angles, rotating vectors, and interpolating smoothly between orientations. The library is designed for applications that need to represent and manipulate 3D rotations, such as animation, robotics, and 3D graphics, where quaternions offer numerical stability and smooth interpolation that Euler angles cannot provide. The package is in Beta development status and has been actively maintained since its first release in 2016. It depends only on numpy for its numerical operations, making installation straightforward. The library supports both Python 2.7 and Python 3.x, though the latest release was in 2020 and the package has not received updates for several years despite the repository remaining active. Use it for: - Animate smooth transitions between 3D object orientations by interpolating quaternions rather than Euler angles. - Represent and compose rotations in robotics or motion-capture systems without gimbal lock issues. - Rotate 3D vectors or point clouds by quaternion-based transformations in graphics or scientific computing. - Build pose estimation or orientation tracking systems that need numerically stable rotation representations. - Perform geometric calculations involving 3D rotations in physics simulations or CAD-like applications. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides quaternion representation, manipulation, and rotation operations for 3D geometry and animation, with support for smooth interpolation between orientations. Yes. Pyquaternion is a stable, low-friction library with no known vulnerabilities, permissive licensing, and active repository maintenance. It fills a clear niche for quaternion math in Python. The main caveat is that the last release was in 2020; if you need support for very recent Python versions or active feature development, verify compatibility first, but for standard 3D rotation tasks it is a reliable choice. ## Install pip install pyquaternion uv add pyquaternion poetry add pyquaternion ## Installing pyquaternion Before you install: Low friction install with a single runtime dependency on numpy. Actively maintained with recent commits; last release was over 5 years ago but the repository remains active and the package is widely used. License in practice: MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you include the license notice. Quickstart: pip install pyquaternion import pyquaternion q = pyquaternion.Quaternion(axis=[0, 1, 0], degrees=90) rotated = q.rotate([0, 0, 4]) Verify before relying: - Whether the package works reliably with Python versions beyond 3.8 (classifiers list 3.8 as the latest tested version). - Current status of the 2.7 support claim given modern Python ecosystem shifts. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 3.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags quaternion rotation library, 3d orientation representation, smooth rotation interpolation, quaternion math python, 3d animation quaternions, axis-angle rotation, pose representation geometry, 3d-geometry, rotation-math, animation [View on SkillFed](https://skillfed.io/packages/pyquaternion) · [View on PyPI](https://pypi.org/project/pyquaternion/)