Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

env: python3.9: No such file or directory

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]?

like image 692
mrgloom Avatar asked Aug 07 '26 10:08

mrgloom


1 Answers

In .git/hooks/pre-commit I have

#!/usr/bin/env python3.9

and running pre-commit install fixed it to #!/usr/bin/env python3.7

like image 197
mrgloom Avatar answered Aug 10 '26 01:08

mrgloom



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!