Skip to content
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

Could not import extension sphinx_tabs.tabs (exception: No module named 'pkg_resources') #187

Open
alexander-schranz opened this issue Dec 15, 2023 · 4 comments
Labels

Comments

@alexander-schranz
Copy link

Describe the bug

context

Sphinx build: https://github.com/schranz-search/schranz-search/actions/runs/7226815693/job/19693182370

Could not import extension sphinx_tabs.tabs (exception: No module named 'pkg_resources')

expectation

No error.

bug
But instead ___ happens

Here's an error message I ran into...

Run sphinx-build docs docs/_build
  sphinx-build docs docs/_build
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.12.1/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib
Running Sphinx v6.2.1

Extension error:
Could not import extension sphinx_tabs.tabs (exception: No module named 'pkg_resources')

problem

I think the problem is not related to sphinx tabs itself just about changes in the python ecosystem. But I don't know how to solve it. The issue appeared this week in my project, last build was 2023-11-23 (Python 3.12.0), maybe somebody has a hint what changed and make now the sphinx tabs crashing. Maybe it has todo with Python 3.12.1 release but not sure.

Reproduce the bug

Build steps are here: https://github.com/schranz-search/schranz-search/blob/0eef487d609d5e47e05b80cc6c5d060148b1fb56/.github/workflows/docs.yml#L28

List your environment

Not sure about this.

Copy link

welcome bot commented Dec 15, 2023

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

@foster999
Copy link
Collaborator

@alexander-schranz please could you update to the latest version, e.g. using pip install -U sphinx-tabs? We no longer depend on pkg_resources so this should sort the error

@foster999
Copy link
Collaborator

Failing that, it looks like Python 12 no longer includes setuptools. So pip install setuptools might help.

If others also find this is the case, we might need to include setuptools as a dependency to support Python 12 properly

@alexander-schranz
Copy link
Author

@foster999 in my case require setuptools did fix it: https://github.com/schranz-search/schranz-search/blob/0.3/docs/requirements.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants