-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
'ModuleNotFoundError' No module named 'tomli'
after installing using pip and venv
#3447
Comments
tomli is a dependency for 3.8: https://github.com/psf/black/blob/main/pyproject.toml#L70 I can't reproduce this on MacOS with 3.8.10. The one thing that stands out in your report is that you're using |
Hi, |
@ichard26 looked into this with me on Discord and found:
|
This prevents bugs due to pypa/packaging#522. Fixes #3447.
Tested in my environment and it solves it. Thanks a lot! |
This prevents bugs due to pypa/packaging#522. Fixes #3447.
I've reproduced this issue on mac today after the Python update to 3.11. Later realised I hadn't changed the version of Python in ci.yaml. Error details: File "/opt/hostedtoolcache/Python/3.10.12/x64/bin/black", line 5, in
File "src/black/init.py", line 52, in File "/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/black/files.py", line 27, in
ModuleNotFoundError: No module named 'tomli' Error: Process completed with exit code 1.` |
Describe the bug
After installing
black
usingpip
inside venv running it results in'ModuleNotFoundError' No module named 'tomli'
exception beeing raised:To Reproduce
python -m venv venv
and
pip install black
black --version
output:
Expected behavior
output:
Environment
Additional context
The same behavior is observed when installing black from the main branch.
The text was updated successfully, but these errors were encountered: