I have some python code formatters as git pre-commit hook and I have changed my python version as
brew list | grep python
[email protected]
[email protected]
brew unlink [email protected]
brew unlink [email protected]
brew link [email protected]
python -V
Python 3.7.9
and know seems something get broken and on git commit I get env: python3.9: No such file or directory
, so what is env
? and how I can edit it to use [email protected]
?
#!/usr/bin/env python
. You might have something like#!/usr/bin/env python3.9
there. You can try to change it to#!/usr/bin/env python3.7
but I cannot assure you it will work without problems, as some features of Python 3.9 might be used by scripts. – Broteenv
it's a shell command that starts programs in a modified environment. You can check some info about it running commandman env
on Linux/Unix. – Brotepre-commit install
and it will fix your shebang to point at your new global python version – Battista