I have a python environment (env_1) with certain libraries installed and create a requirements.txt
using the following command:
conda list --export > requirements.txt
The requirements.txt
file contains the following dependencies in it:
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:
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
OS: linux
Try generating the environment's file with:
conda env export > environment.yaml
More info about conda export here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.