作者:mobiledu2502889793 | 来源:互联网 | 2023-09-16 15:36
cat /etc/redhat-release
1
| CentOS release 6.9 (Final) |
yum info python
1 2
| Name: python
Version: 2.6.6 |
Try install pre-commit
1 2
| curl https://bootstrap.pypa.io/get-pip.py | sudo python - pre-commit
cd /var/opt/gitlab/git-data/repositories/test-group/test-project.git/ |
pre-commit install
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Traceback (most recent call last):
File "/usr/bin/pre-commit", line 7, in
from pre_commit.main import main
File "/usr/lib/python2.6/site-packages/pre_commit/main.py", line 8, in
import pre_commit.constants as C
File "/usr/lib/python2.6/site-packages/pre_commit/constants.py", line 23, in
VERSION = pkg_resources.get_distribution('pre-commit').version
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 292, in get_distribution
if isinstance(dist,Requirement): dist = get_provider(dist)
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 176, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 648, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pre-commit
|
该提问来源于开源项目:pre-commit/pre-commit
Oh I wasn't necessarily suggesting using docker, that's just the easiest way for me to try things against centos