【问题标题】:How to resolve the conda issue: PackagesNotFoundError: The following packages are not available from current channels如何解决 conda 问题:PackagesNotFoundError: 当前频道无法提供以下软件包
【发布时间】:2021-07-29 16:18:11
【问题描述】:

我正在尝试使用 miniforge 在 MacBook Pro M1 上安装 symfit,以实现处理器兼容性,因为 pip3 install symfit 会导致错误。但是,在运行 conda install -c conda-forge symfit 时,我得到:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - symfit

Current channels:

  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://conda.anaconda.org/conda/osx-arm64
  - https://conda.anaconda.org/conda/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

这样做时,我发现 symfit 在 conda-forge 频道中可用!为什么不能从命令行安装?

【问题讨论】:

标签: python conda symfit


【解决方案1】:

更新: 此答案是在 OP 更改为使用正确的 conda install -c conda-forge symfit 命令之前发布的!

  • 在提问时发现 symfit 没有构建“OSX_arm64”,这就是命令失败的原因

因为conda install 会尝试从默认频道安装模块...
你必须明确告诉 conda 使用 conda-forge!

conda install -c conda-forge symfit 

->检查文档!! https://symfit.readthedocs.io/en/stable/installation.html

【讨论】:

  • 感谢您的回复,我已经尝试过了,但没有成功会导致同样的错误!
  • 和上面完全一样,我已经编辑了我的初始帖子以显示完整的消息。
  • 可能是因为你的处理器......只有OSX-64 轮子可用......OSX-arm64 (anaconda.org/conda-forge/symfit) 没有轮子,但我对这类事情没有经验。 ..
  • 只是为了检查......numpy 例如有一个明确的OSX-arm64 轮子(anaconda.org/conda-forge/numpy
  • 如果您搜索替换库来进行拟合...您可能想看看 scipy.optimize (docs.scipy.org/doc/scipy/reference/optimize.html) (很可能是 symfit 绘制的库很合适-函数来自....)
【解决方案2】:

在提出问题时,the Conda Forge feedstock for symfit 不是为 osx-arm64 平台构建的。在原料上an issue being filed 之后,one of the maintainers updated the feedstock 生成noarch 构建(平台无关)。因此,从 0.5.3 版本开始,OP 尝试的应该可以正常工作。

conda install -c conda-forge symfit

这里的教训是:Conda Forge 是一个开放平台,所以如果您发现某些东西没有被构建,请联系原料或提交拉取请求。社区依靠用户的积极反馈来改进。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-07-07
    • 2018-07-27
    • 1970-01-01
    • 2021-12-10
    • 2020-10-03
    • 1970-01-01
    • 2020-10-13
    • 1970-01-01
    相关资源
    最近更新 更多