【问题标题】:Conda's requirements.txt is not installing properlyConda 的 requirements.txt 没有正确安装
【发布时间】:2021-03-25 14:52:43
【问题描述】:

我有一个安装了某些库的 python 环境 (env_1),并使用以下命令创建了一个 requirements.txt

conda list --export > requirements.txt

requirements.txt 文件中包含以下依赖项:

beautifulsoup4=4.9.3=pyhb0f4dca_0
numpy=1.15.4=py36h8b7e671_1001
pillow=8.0.0=py36h9a89aac_0
python=3.6.13=hdb3f193_0
sqlite=3.33.0=h62c20be_0
pandas==1.0.1=py36hb3f55d8_0

然后我使用coda deactivate 退出环境并尝试使用以下命令在requirements.txt 文件中创建一个新环境(test_env):

conda create --name test_env  --file requirements.txt 

但是这个报告和错误说:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed

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

- numpy==1.15.4=py36h8b7e671_1001
- pandas==1.0.1=py36hb3f55d8_0

Current channels:

  - https://repo.anaconda.com/pkgs/main/linux-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/linux-64
  - https://repo.anaconda.com/pkgs/r/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.

软件:anaconda

操作系统:linux

【问题讨论】:

    标签: python pip anaconda


    【解决方案1】:

    尝试使用以下命令生成环境文件:

    conda env export > environment.yaml
    

    有关 conda 导出here 的更多信息。

    【讨论】:

      猜你喜欢
      • 2020-07-31
      • 2017-06-21
      • 1970-01-01
      • 2018-06-08
      • 1970-01-01
      • 2018-01-10
      • 2019-08-27
      • 2017-03-21
      • 2017-04-26
      相关资源
      最近更新 更多