Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to separate packages with multiple channels in yaml using conda to create customized env

I need to create an environment mock up the one using virtualenv, the packages belong to various channels in anaconda. Though I specified channels, I received error for some packages.

my_env.yml:

name: my_env
channels:
- anaconda
- conda-forge
dependencies:
- numpy=1.15.2
- scipy=1.1.0
- scikit-learn=0.20.0
- pandas=0.22.0
- SQLAlchemy=1.1.14
- graphviz=0.8
- slacker=0.9.60

Note:

slacker is in conda-forge channel SQLAlchemy and graphviz are in anaconda channel the others are just in regular (default) channel

When I run the command:

conda env create -f /home/my_env.yml

I received the following error:

Solving environment: failed

ResolvePackageNotFound: - sqlalchemy=1.1.14 - graphviz=0.8

Seems channel anaconda is NOT picked up?

How can I fix this yml file?

Thank you very much.

like image 432
mdivk Avatar asked Nov 07 '22 20:11

mdivk


1 Answers

This is not an answer because the way you have it worked for me with the dependencies I rely on. Did you try including defaults as well as the channels you specify?

Here's my YAML file ...

name: talia36
channels:
  - defaults
  - pytorch
dependencies:
  - coverage
  - cudatoolkit==10.0.130
  - dataclasses
  - future
  - joblib
  - jupyter
  - keyring
  - matplotlib
  - mypy
  - numpy
  - pandas==0.25.3
  - param
  - pip
  - pylint
  - python==3.6.10
  - python-dateutil
  - pytorch==1.2.0
  - pyyaml
  - scikit-learn
  - scipy
  - seaborn
  - sqlite
  - tensorboard==1.14.0
  - torchvision==0.4.0
  - pip:
    - --requirement experiment-requirements.txt  
like image 67
dumbledad Avatar answered Nov 10 '22 01:11

dumbledad