VS Code error: pre-commit not found. Did you forget to activate your virtualenv?
See original GitHub issueHaving the same problem as @UrszulaCzerwinska in #359.
Trying to use the VS Code source control UI to commit in a project with pre-commit@2.6.0, I get the error
Git:
pre-commitnot found. Did you forget to activate your virtualenv?

Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
python 3.x - pre-commit not using virtual environment
I 'm trying to have pre-commit check if my Python project's requirements.txt matches pip freeze (for my current venv) - is there a...
Read more >pre-commit
We run our hooks on every commit to automatically point out issues in code such as missing semicolons, trailing whitespace, and debug statements....
Read more >Python HOW: Using Poetry, Make, and pre-commit-hooks to ...
Make sure you don't have any virtual environment activated in the CLI. Run the setup target using make , and you are done!...
Read more >Pycharm does not use virtualenv pep8 for git-hooks : PY-12988
I have a similar problem that I guess that is related. I have a pyenv virtualenv for the project, and I run flake8...
Read more >Commit hooks are skipped due to PATH issues - Jira - Atlassian
I 've recently noticed that linting errors are not caught with our pre-commit hooks. At first I thought it's a problem with lint-staged...
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 Free
Top 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
from that output it appears you ran
pre-commit installusing thethermoenvironment (which may not exist any more?) could you try re-runningpre-commit installand seeing if the issue persists?if you’re on macos, I’d generally suggest
brew install pre-commitover using condamy guess (you haven’t provided enough information) is you’re using conda on windows – there’s a known issue with conda’s packaging there: https://github.com/conda-forge/pre-commit-feedstock/issues/9