You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Anaconda环境安装web3.py遇PackagesNotFoundError问题求助

解决Anaconda安装web3.py失败的方案

可行解决步骤:

  • 更新conda并调整通道优先级
    先更新conda基础环境,确保通道配置无异常:

    conda update -n base conda
    

    重置conda-forge通道优先级,避免通道冲突导致包检索失败:

    conda config --add channels conda-forge
    conda config --set channel_priority strict
    
  • 在conda环境内使用pip安装
    激活目标conda环境后,直接通过pip安装web3.py:

    conda activate your_env_name
    pip install web3
    

    确认使用的pip是当前conda环境自带的,而非系统残留的旧版本。

  • 创建全新conda环境重试
    旧环境可能存在依赖残留冲突,创建干净的环境再尝试:

    conda create -n new_web3_env python=3.9
    conda activate new_web3_env
    conda install -c conda-forge web3
    

    选择Python 3.9这类兼容性较稳定的版本,避免过新/过旧版本引发的兼容问题。

  • 指定具体版本安装
    尝试安装conda-forge仓库中明确存在的web3版本,例如:

    conda install -c conda-forge web3==6.12.0
    

内容的提问来源于stack exchange,提问作者Rudy Dubé

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.09 12:50:23