在Ubuntu22.04的Miniconda3中安装evaluate库遇版本冲突错误
解决Miniconda中Python 3.12与evaluate库的版本冲突问题
问题描述
在Ubuntu 22.04的全新Miniconda3环境中,执行conda install evaluate时出现LibMambaUnsatisfiableError,原因是当前环境Python版本为3.12.*,而conda默认源中的evaluate包暂不支持该版本(仅兼容到Python 3.11),具体错误信息如下:
Channels: - defaults Platform: linux-64 Collecting package metadata (repodata.json): done Solving environment: - warning libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE failed LibMambaUnsatisfiableError: Encountered problems while solving: - package evaluate-0.3.0-py310h06a4308_0 requires python >=3.10,<3.11.0a0, but none of the providers can be installed Could not solve for environment specs The following packages are incompatible ├─ evaluate is installable with the potential options │ ├─ evaluate [0.3.0|0.4.0] would require │ │ └─ python >=3.10,<3.11.0a0 , which can be installed; │ ├─ evaluate 0.3.0 would require │ │ └─ python >=3.7,<3.8.0a0 , which can be installed; │ ├─ evaluate [0.3.0|0.4.0] would require │ │ └─ python >=3.8,<3.9.0a0 , which can be installed; │ ├─ evaluate [0.3.0|0.4.0] would require │ │ └─ python >=3.9,<3.10.0a0 , which can be installed; │ └─ evaluate 0.4.0 would require │ └─ python >=3.11,<3.12.0a0 , which can be installed; └─ pin-1 is not installable because it requires └─ python 3.12.* , which conflicts with any installable versions previously reported.
解决方法
方法1:使用pip安装evaluate
Hugging Face官方库的pip源更新速度通常快于conda默认源,Python 3.12可直接通过pip安装兼容版本:
- 激活目标conda环境:
conda activate your_env_name - 执行pip安装:
pip install evaluate
方法2:创建兼容Python版本的新conda环境
如果需要继续用conda管理依赖,可创建指定Python版本(如3.11,evaluate 0.4.0支持该版本)的新环境:
- 创建新环境:
conda create -n hf_llm_env python=3.11 - 激活环境:
conda activate hf_llm_env - 安装evaluate:
conda install evaluate
方法3:通过conda-forge源安装
conda-forge社区源的包更新更及时,可能已支持Python 3.12的evaluate版本:
- 添加conda-forge源并设置优先级:
conda config --add channels conda-forge conda config --set channel_priority strict - 安装evaluate:
conda install evaluate
内容的提问来源于stack exchange,提问作者Tetro
相关产品推荐
相关产品推荐

