我使用conda Python环境。每当我尝试运行pre-commit install-hooks
时,我都会收到以下错误
Could not fetch URL https://pypi.org/simple/ruamel-yaml/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded w
ith url: /simple/ruamel-yaml/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
...
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
但是,pip
在我使用时工作正常。
我已经试过pre-commit clean
,卸载pre-commit
并重新安装它(用conda
或pip
),更新pip
,关闭VPN,以及我在Google上找到的任何其他解决方案。似乎都不起作用。你能帮帮我吗?.pre-commit-config.yaml
看起来像这样:
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
language_version: python3.8
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
1条答案
按热度按时间cngwdvgl1#
以下内容对我有帮助: