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

Missing dependency when installing with Python 3.12 #3810

Open
dannycolin opened this issue Jan 26, 2024 · 0 comments
Open

Missing dependency when installing with Python 3.12 #3810

dannycolin opened this issue Jan 26, 2024 · 0 comments

Comments

@dannycolin
Copy link

Description

After following the instruction to install the local dev environment, I tried to run npm run start and got the following error:

Error: While importing 'webcompat', an ImportError was raised:

Traceback (most recent call last):
  File "/home/dcolin/Projects/webcompat.com/env/lib64/python3.12/site-packages/flask/cli.py", line 256, in locate_app
    __import__(module_name)
  File "/home/dcolin/Projects/webcompat.com/webcompat/__init__.py", line 14, in <module>
    from flask_limiter import Limiter
  File "/home/dcolin/Projects/webcompat.com/env/lib64/python3.12/site-packages/flask_limiter/__init__.py", line 3, in <module>
    from .errors import RateLimitExceeded
  File "/home/dcolin/Projects/webcompat.com/env/lib64/python3.12/site-packages/flask_limiter/errors.py", line 3, in <module>
    from distutils.version import LooseVersion
ModuleNotFoundError: No module named 'distutils'

This happens because the distutils package has been removed from the standard library in Python 3.12.

Solution

Adding setuptools as a dev dependency solve this problem since it includes distutils.

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

No branches or pull requests

1 participant