VS Code error: pre-commit not found. Did you forget to activate your virtualenv?

See original GitHub issue

Having 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-commit not found. Did you forget to activate your virtualenv?

screenshot

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
asottilecommented, Jul 17, 2020

from that output it appears you ran pre-commit install using the thermo environment (which may not exist any more?) could you try re-running pre-commit install and seeing if the issue persists?

if you’re on macos, I’d generally suggest brew install pre-commit over using conda

1reaction
asottilecommented, Jul 17, 2020

my 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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found