I would like to have one YAML file that could serve to both create virtual environments and (most importantly) as a base for installing packages by conda into the global env. I am trying:
conda install --file ENV.yaml
But it is not working since conda expects pip
-like format of the requirements. What command should I execute to install packages from my YAML file globally?
in terminal, type : conda list to obtain the packages installed using conda. There may be some overlap of these lists as pip may recognize packages installed by conda (but maybe not the other way around, IDK).
Installing packages on a non-networked (air-gapped) computer Conda installs packages into the anaconda/pkgs directory. If conda cannot find the file, try using an absolute path name instead of a relative path name. Installing packages directly from the file does not resolve dependencies.
Installing with conda. To install conda packages, in the terminal or an Anaconda Prompt, run: conda install [packagename] During the install process, files are extracted into the specified environment, defaulting to the current environment if none is specified. Installing the files of a conda package into an environment can be thought ...
The actual environment is created with: conda env create -f base.yml. Later on, additional packages need to be added to base.yml. Another file, say local.yml, needs to import those updates.
If you have software in a Python wheel file and want to use it with conda or install it in a conda environment, there are 3 ways. The best way is to obtain the source code for the software and build a conda package from the source and not from a wheel. This helps ensure that the new package uses other conda packages to satisfy its dependencies.
To create a new meta.yamlfile, open your favorite editor. Create a new text file and insert the information shown below. A blank sample meta.yamlfollows the table to make it easier to match up the information. Note To allow correct sorting and comparison, specify versionas a string. name click version
You want the conda-env
command instead, specifically
conda env update -n my_env --file ENV.yaml
Read the conda env update --help
for details.
If you wish to install this in the base env, then you would use
conda env update -n base --file ENV.yaml
Note that the base env isn't technically "global", but rather just the default env as well as where the conda
Python package lives. All envs are isolated unless you are either using the --stack
flag during activation to override the isolation or have - contra recommended practice - manually manipulated PATH
to include an env.
If your conda env is already activated, use:
conda env update --file environment.yml
Or update a specific environment without activating it:
conda env update --name envname --file environment.yml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With