首页 > 其他分享 >conda 环境下 pre-commit 失败

conda 环境下 pre-commit 失败

时间:2024-12-22 17:44:36浏览次数:6  
标签:pre None cache rapidfuzz conda connect commit

1. 是 conda 安装的 python 环境导致的失败 

2. 解决:

  - 从官网重新安装个 python

  - 进入刚安装的 python 环境,重新 pip install pre-commit

  - 重新 pre-commit install  (在这之前先把原本目录下的文件删除:C:\\Users\\Administrator\\.cache\\pre-commit\\repoxxxx\)

 3. 参考:

https://github.com/pre-commit/pre-commit/issues/2813

https://stackoverflow.com/questions/68794749/unable-to-run-pre-commit-in-anaconda-environment/74689913#74689913

 

[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('C:\\Users\\Administrator\\.cache\\pre-commit\\repo9j87k2fn\\py_env-default\\Scripts\\python.EXE', '-mpip', 'install', '.')
return code: 1
stdout:
    Processing c:\users\administrator\.cache\pre-commit\repo9j87k2fn
      Preparing metadata (setup.py): started
      Preparing metadata (setup.py): finished with status 'done'
    Could not fetch URL https://pypi.org/simple/rapidfuzz/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/rapidfuzz/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
    INFO: pip is looking at multiple versions of pre-commit-hooks to determine which version is compatible with other requirements. This could take a while.
stderr:
    WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/rapidfuzz/        
    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/rapidfuzz/        
    ERROR: Could not find a version that satisfies the requirement rapidfuzz (from pre-commit-hooks) (from versions: none)
    ERROR: No matching distribution found for rapidfuzz
Check the log at C:\Users\Administrator\.cache\pre-commit\pre-commit.log

 

标签:pre,None,cache,rapidfuzz,conda,connect,commit
From: https://www.cnblogs.com/chaoqi/p/18622319

相关文章

  • ReactPress 1.6.0:重塑博客体验,引领内容创新
    ReactPress是一个基于Next.js的博客&CMS系统,Github项目地址:https://github.com/fecommunity/reactpress欢迎Star。体验地址:http://blog.gaoredu.com/今天,我们自豪地宣布ReactPress1.6.0版本的正式发布,此次更新不仅带来了多项令人振奋的新功能,还修复了多个用户反馈的......
  • conda常用命令
    condaenvlist列出环境列表condaactivate[环境名] 切换到[环境名]这个环境下condainstall[包名] conda安装包condauninstall[包名]卸载包 condaclean--all清理缓存、tarball文件以及未使用的文件什么时候用?之前安装包的时候进度条卡住不动了,于是我直接关......
  • 【视觉语言导航】VLN辅助任务:MLM、SAP、SAR、SPREL——预训练、微调中常用的提点策略
    【视觉语言导航】VLN辅助任务:MLM、SAP、SAR、SPREL——预训练、微调中常用的提点策略MLM——文本掩码建模SAP和SARSAP——单步动作预测SAR——单步动作回归SPREL——空间关系预测MLM——文本掩码建模出处:《TowardsLearningaGenericAgentforVision-and-Languag......
  • 【优选算法】Prefix-Kage:前缀和的算法影(下)
    文章目录1.前缀和+后缀和1.1寻找数组的中心下标1.2除自身以外数组的乘积2.前缀和+哈希表2.1和为k的子数组2.2和可被k整除的子数组2.3连续数组3.二维前缀和拓展3.1矩阵区域和希望读者们多多三连支持小编会继续更新你们的鼓励就是我前进的动力!本篇是前缀和算法......
  • wordpress系统问题排查
    1.通过FTP或文件管理器访问服务器文件一般情况下,WordPress的错误日志位置取决于服务器的配置和WordPress本身的设置。常见的位置是在/wp-content/目录下,文件名可能是debug.log。使用FTP客户端(如FileZilla)连接到服务器,找到WordPress安装目录下的wp-content/文件夹。......
  • MapReduce的词频统计应用
    MapReduce在云计算大数据中的词频统计应用文章目录MapReduce在云计算大数据中的词频统计应用前言一、MapReduce的基本流程二、词频统计的具体实现1、准备数据文件2、创建MapReduce项目3、创建Mapper类4、创建Reducer类5、创建Driver类6、运行作业并查看结果总结前......
  • VAR:Visual Autoregressive Modeling: Scalable ImageGeneration via Next-Scale Pred
    目录一、概述二、相关工作1、大型自回归语言模型的性质2、视觉生成三、VAR 1、讨论传统AR的缺点2、VAR框架一、概述    该论文提出了一种新的生成范式VAR视觉自回归模型,(区别于ddpm那种加噪之后unet去噪的工作),这种自回归模型实现coarsetofine的方法进行生......
  • 使用Anaconda和PyTorch编写深度学习Python代码
    摘要:通过Anaconda的虚拟环境和PyTorch的深度学习框架来建立Python的深度学习代码一、安装Anaconda在官网下载Anaconda,DownloadAnacondaDistribution|Anaconda等待漫长的下载过程这时候我推荐来一把酣畅淋漓的原神:二、配置Anaconda的国内镜像源参考:conda安装包_......
  • 网格布局警告DeprecationWarning
    过时未解决E:/pycharmProject/untitled4/QGridLayout.py:3:DeprecationWarning:sipPyTypeDict()isdeprecated,theextensionmoduleshouldusesipPyTypeDictRef()insteadclassDemo(QWidget):fromPyQt5importQtCorefromPyQt5.QtWidgetsimport*classDemo(QWid......
  • java.util.prefs.Preferences简单例子
    Java的PreferencesAPI提供了一种简单的方式来存储和检索用户或系统级别的首选项(键值对数据)。这些数据可以持久化存储,例如保存用户设置。下面是一个最简单的例子:示例:保存和读取用户首选项importjava.util.prefs.Preferences;publicclassPreferencesExample{publ......