Skip to content

Conversation

ahmrr
Copy link

@ahmrr ahmrr commented Aug 18, 2025

Motivation

Using pkg_resources is deprecated and slated for removal:

Use of pkg_resources is deprecated in favor of importlib.resources, importlib.metadata and their backports (importlib_resources, importlib_metadata).

Thus, running manim on e.g. Python 3.11.13 results in the following warning:

UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The > pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.

Proposed changes

I simply updated the versioning code in __init__.py to use importlib.metadata instead of pkg_resources.

Test

Code:

$ manim --version

Result:

ManimGL v1.7.2

@azhuchkov
Copy link

Unfortunately, this PR (apparently useful) duplicates another one: #2360.

@ahmrr
Copy link
Author

ahmrr commented Aug 18, 2025

You're right, my apologies; I should have checked the other pull requests.

@ahmrr ahmrr closed this Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants