@kienerj on a Windows machine you can (currently) see the YAML files used under:
\knime_4.5.x\plugins\org.knime.python2.envconfigs_4.5.x.yyyyyyyyyy\envconfigs
that can help to build one’s own configuration. If you already have built an environment and want to save it in a ‘clean’ (reusable) way the way to go seems to be the --from-history
function:
opened 01:28PM - 17 Jan 17 UTC
type::feature
source::community
plugins::env
stale::recovered
Hi,
I have several questions about exporting a conda environment. When I'm in… side my env, I use `conda env export > environment.yml` but:
1. How can I export my environment **without version numbers** and with only **main packages** (without their dependencies. As dependencies will be installed when packages are being installed). In other words, a 'clean' env like this:
```yml
name: my-env
dependencies:
- python
- ipython
- pandas
- scikit-learn
- pip:
- jupyter_kernel_gateway
```
2. The last line is the prefix. What is it or what is its purpose? (I could not find the answer in the doc) and how can I prevent conda to export this line with my folder path in 'clear' as it it not 'sharing ready'.
If I missed something from the doc, please refer to it.
Thanks
Linux …
conda env export --from-history | grep -v “prefix” > environment.yaml
Windows:
conda env export --from-history | findstr -v “prefix” > environment.yaml
3 Likes