【问题标题】:conda fails when installing protobuf for tensorflow为 tensorflow 安装 protobuf 时 conda 失败
【发布时间】:2020-06-09 11:36:28
【问题描述】:

我正在使用 anaconda 命令提示符安装 protobuf

conda install -c anaconda protobuf

因为这个错误而失败

收集包元数据(current_repodata.json):完成 求解环境:初始冻结求解失败。使用灵活的求解重试。

我的系统是 WIN 10。我将 protobuf 用于 tensorflow-gpu 1.8

我的 python 版本是 3.6.0。我的anaconda版本是4.8.3,我的配置是

add_anaconda_token: True 
add_pip_as_python_dependency: True 
aggressive_update_packages: - ca-certificates - certifi - openssl allow_conda_downgrades: False 
allow_cycles: True 
allow_non_channel_urls: False 
allow_softlinks: False 
always_copy: False 
always_softlink: False 
always_yes: None 
anaconda_upload: None 
auto_activate_base: True 
auto_stack: 0 
auto_update_conda: True 
bld_path: changeps1: True 
channel_alias: conda.anaconda.org

【问题讨论】:

  • 安装 tensorflow-gpu 或 tensorflow-gpu 后是否遇到了 protobuf 问题?我能够运行命令 conda install -c anaconda protobuf,但我得到了与安装 tensorflow-gpu 时看到的相同的错误。 conda install tensorflow-gpu=1.8为了调试,你运行的是什么版本的conda? conda --version,你的 conda 配置是什么? conda config --show
  • 另外,你可以使用版本 tensorflow-gpu=1.9 代替吗?它没有包兼容性问题
  • 我的 conda 版本是 4.8.3 @DonaldStierman
  • add_anaconda_token:真 add_pip_as_python_dependency:真积极更新包:-ca-certificates-certifi-openssl allow_conda_downgrades:假 allow_cycles:真 allow_non_channel_urls:假 allow_softlinks:假 always_copy:假 always_softlink:假 always_yes:无 anaconda_upload:无 auto_activate真正的 auto_stack:0 auto_update_conda:真正的 bld_path:changeps1:真正的 channel_alias:conda.anaconda.org
  • 环境的内容是什么?您是否尝试过创建一个新环境将所有您需要的包?

标签: python anaconda protocol-buffers conda


【解决方案1】:

尝试从 conda-forge 安装 tensorflow-gpu 和 protobuf 包。

conda install -c conda-forge tensorflow-gpu=1.8

protobuf 包含在此安装中,因此无需单独安装。

更新:

看起来 anaconda 上的包根本不起作用。即使只使用 tensorflow-gpu=1.8 包(见下文)创建新的 conda env 也会产生冲突错误。 conda-forge 上的版本很好。

不工作(蟒蛇):

  conda create --dry-run --json -c anaconda -n dummy tensorflow-gpu=1.8

  {
      "error": "UnsatisfiableError: ",
      "exception_name": "UnsatisfiableError",
      "exception_type": "<class 'conda.exceptions.UnsatisfiableError'>",
  }

工作(conda-forge):

  conda create --dry-run --json -c conda-forge -n dummy tensorflow-gpu=1.8

  {
      ...
      "success": true
      ...
  }

【讨论】:

  • 感谢回复,对我有用的是等待 6-7 小时 conda install -c anaconda protobuf 它突然解决了 600+mb 文件下载
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-08-19
  • 2020-03-22
  • 2017-06-03
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多