No package metadata was found for pre-commit
See original GitHub issuesearch you tried in the issue tracker
No package metadata was found for pre-commit
describe your issue
Unable to install pre-commit inside Docker container based on FROM python:3.9.15-alpine3.16
python --version
Python 3.9.15
⬢ [Docker] ✗ pip install pre-commit
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pre-commit in /home/terraform/.local/lib/python3.9/site-packages (2.20.0)
Requirement already satisfied: cfgv>=2.0.0 in /home/terraform/.local/lib/python3.9/site-packages (from pre-commit) (3.3.1)
Requirement already satisfied: pyyaml>=5.1 in /home/terraform/.local/lib/python3.9/site-packages (from pre-commit) (6.0)
Requirement already satisfied: nodeenv>=0.11.1 in /home/terraform/.local/lib/python3.9/site-packages (from pre-commit) (1.7.0)
Requirement already satisfied: identify>=1.0.0 in /home/terraform/.local/lib/python3.9/site-packages (from pre-commit) (2.5.9)
Requirement already satisfied: virtualenv>=20.0.8 in /home/terraform/.local/lib/python3.9/site-packages (from pre-commit) (20.16.7)
Requirement already satisfied: toml in /home/terraform/.local/lib/python3.9/site-packages (from pre-commit) (0.10.2)
Requirement already satisfied: setuptools in /usr/local/lib/python3.9/site-packages (from nodeenv>=0.11.1->pre-commit) (58.1.0)
Requirement already satisfied: filelock<4,>=3.4.1 in /home/terraform/.local/lib/python3.9/site-packages (from virtualenv>=20.0.8->pre-commit) (3.8.0)
Requirement already satisfied: platformdirs<3,>=2.4 in /home/terraform/.local/lib/python3.9/site-packages (from virtualenv>=20.0.8->pre-commit) (2.5.4)
Requirement already satisfied: distlib<1,>=0.3.6 in /home/terraform/.local/lib/python3.9/site-packages (from virtualenv>=20.0.8->pre-commit) (0.3.6)
pre-commit install
Traceback (most recent call last):
File "/usr/bin/pre-commit", line 33, in <module>
sys.exit(load_entry_point('pre-commit==2.20.0', 'console_scripts', 'pre-commit')())
File "/usr/bin/pre-commit", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 957, in distribution
return Distribution.from_name(distribution_name)
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 548, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for pre-commit
pre-commit --version
2.20.0
.pre-commit-config.yaml
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.50.0
hooks:
- id: terraform_fmt
- id: terraform_docs
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
# Git style
- id: check-added-large-files
- id: check-merge-conflict
- id: check-vcs-permalinks
- id: forbid-new-submodules
- id: no-commit-to-branch
- id: check-symlinks
- id: mixed-line-ending
args: [--fix=auto]
# Common errors
- id: check-yaml
args: [--allow-multiple-documents]
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
# Cross platform
- id: check-case-conflict
# Security
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- id: detect-private-key
~/.cache/pre-commit/pre-commit.log (if present)
No response
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
"No package metadata was found for metaseq" when execute ...
What is your question? I try to run metaseq-api using Google Colab, but when I execute metaseq-api-local command after setup, ...
Read more >Pre-commit not finding python packages - Stack Overflow
pre-commit installs isolated environments for each of the tools such that they don't interfere with local development.
Read more >1694366 – (pre-commit) Review Request - Red Hat Bugzilla
JFYI I'm packaging importlib-metadata for new tox. Also, this should be called just pre-commit, not python-pre-commit and python3-pre-commit, thanks.
Read more >pre-commit
We built pre-commit to solve our hook issues. It is a multi-language package manager for pre-commit hooks. You specify a list of hooks...
Read more >pre-commit hooks | Documentation - Poetry
An option to explicit exclude repositories will not be implemented into pre-commit . Footer. Poetry. Python packaging and dependency management made easy.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@asottile I was able to reproduce…
@bxscif thank you!