Skip to content

ModuleNotFoundError: No module named 'pkg_resources' on python 3.12 #169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dunossauro opened this issue Jun 4, 2023 · 4 comments
Closed
Labels
external Concerns another part of the ecosystem info required Further information is requested stale No news, closing

Comments

@dunossauro
Copy link

On python 3.12 beta we can't install mkdocs-macro, pkg_resources does not exist

 File "/.../.venv/lib/python3.12/site-packages/mkdocs_macros/__init__.py", line 7, in <module>
    from .context import fix_url, is_relative as is_relative_url
  File "/.../.venv/lib/python3.12/site-packages/mkdocs_macros/context.py", line 19, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

Related to #157

@github-actions
Copy link

github-actions bot commented Jun 4, 2023

Welcome to this project and thank you!' first issue

@fralau fralau added the external Concerns another part of the ecosystem label Jun 4, 2023
@fralau
Copy link
Owner

fralau commented Jun 4, 2023

This is apparently not an mkdocs-macros issue, but due to a broken setuptools install:
https://stackoverflow.com/questions/7446187/no-module-named-pkg-resources

Let me know if fixing setuptools fixed the issue for you?

@fralau fralau added the info required Further information is requested label Jul 2, 2023
@fralau
Copy link
Owner

fralau commented Jul 2, 2023

Is this problem still open?

@fralau fralau added the stale No news, closing label Aug 7, 2023
@fralau fralau closed this as completed Aug 13, 2023
@calebAtIspot
Copy link

@fralau this is a mkdocs-macros issue. pkg_resources has been deprecated and should no longer be used.

https://setuptools.pypa.io/en/latest/pkg_resources.html

Use of pkg_resources is deprecated in favor of importlib.resources, importlib.metadata and their backports (importlib_resources, importlib_metadata). Some useful APIs are also provided by packaging (e.g. requirements and version parsing). Users should refrain from new usage of pkg_resources and should work to port to importlib-based solutions.

Relevant: mu-editor/mu#2485

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external Concerns another part of the ecosystem info required Further information is requested stale No news, closing
Projects
None yet
Development

No branches or pull requests

3 participants