简体   繁体   English

Conda 的 requirements.txt 没有正确安装

[英]Conda's requirements.txt is not installing properly

I have a python environment (env_1) with certain libraries installed and create a requirements.txt using the following command:我有一个安装了某些库的 python 环境(env_1),并使用以下命令创建了一个requirements.txt

conda list --export > requirements.txt

The requirements.txt file contains the following dependencies in it: 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

Then I came out of environment using coda deactivate and tried creating a new environment(test_env) with the dependencies in requirements.txt file using the below command:然后我使用coda deactivate退出环境,并尝试使用以下命令在requirements.txt文件中创建一个新环境(test_env):

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

But this reported and error saying:但是这个报告和错误说:

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.

software: anaconda软件:anaconda

OS: linux操作系统:linux

Try generating the environment's file with:尝试使用以下命令生成环境文件:

conda env export > environment.yaml

More info about conda export here .有关 conda 导出的更多信息,请点击此处

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM