I'm trying to create an environment with miniconda by using a requirements.yml
file generated from another conda environment. I have troubles with packages that are coming from channels.
On a machine the requirements.yml
is generated from an existing environment with the following command:
(myenv)$ conda env export > requirements.yml
The contents of the requirements.yml
file are (after cleaning version numbers):
name: myenv
channels: !!python/tuple
- !!python/unicode
'defaults'
dependencies:
- pytest
- conda-forge::pytest-xdist
- pytest-cov
- numpy
- scipy
- pymongo
- auto::pycallgraph
- flask
- conda-forge::flask-restful
- conda-forge::flask-httpauth
- blaze::flask-mongoengine
- hugo::flask-security
- flask-wtf
- wtforms
- conda-forge::mongoengine
- pip:
- descartes
prefix: .miniconda2/envs/myenv
The above packages have been installed "manually" by specifying the channel, e.g.,
$(myenv) conda install -c conda-forge pytest-xdist
Transferring the requirements.yml
to another machine (same architecture, linux-64), conda fails in creating a new environment:
$ conda env create --file requirements.yml
Fetching package metadata .......
Solving package specifications: .
Error: Packages missing in current linux-64 channels:
- conda-forge::pytest-xdist
- auto::pycallgraph
- conda-forge::flask-restful
- conda-forge::flask-httpauth
- blaze::flask-mongoengine
- hugo::flask-security
- conda-forge::mongoengine
It seems that conda cannot parse the syntax <channel>::<package name>
.
System used: docker image continuumio/miniconda.
Do you have any ideas how to nicely create a new environment from a specification file (e.g., useful for continuous integration) ?