Once you've created a custom environment, you need to "activate" it with the following:īy doing this, the environmental variables associated with your custom Anaconda environment (including the path to executable files) will become active.įrom here, you may install packages using the "conda install" command. If you wish to save in another directory:Ĭonda create -prefix /path-to-env/env-name Note: You can't combine the -prefix and -name flags, you may only choose one. In order to ensure that there is no conflict between the software you'd like to install and existing programs (e.g., dependency version conflicts), it's best to create a custom Anaconda environment. First load the appropriate module (either Anaconda2 or Anaconda3, depending on which version of Python is desired): The easiest way to install many software packages is by using the Anaconda package manager. Alternatively, you may install the program locally in your home or project directory. This may be preferable if the program is widely used and likely to be of interest to multiple users.Ģ. You are welcome to submit a ticket and ask the HPC support staff to install the software package. However, since the base environment is also an environment, the answer applies to both cases in the same way.When HPC users have need of software that is not currently installed on SeaWulf, there are two basic approaches that can be taken to get the programs installed:ġ. Executing conda update -all inside such an environment will update the packages inside this environment. The command run in the base environment will update the packages in this, but usually you should work with virtual environments ( conda create -n myenv and then conda activate myenv). But that is only to hack your way around issues, definitely not the normal-user case!ġ If you actually want to update the packages of your installation, which you usually don't. Or break the compatibility of the packages (which you usually don't want!), which is only possible by explicitly invoking an ignore-dependencies and force-command. So you still cannot upgrade them all by doing the upgrades separately the dependencies are just not satisfiable so earlier or later, an upgrade will downgrade an already upgraded package again. ( this is a pedagogical example, of course, but it's the same in reality, usually just with more complicated dependencies and sub-dependencies) So upgrading Y > 5.0 implies downgrading X to < 2.0 and vice versa. This way conda does also search in this places for available packages.Ĭonsidering your update: You can upgrade them each separately, but doing so will not only include an upgrade but also a downgrade of another package as well. It's rather a hack.Ī safe way you can try is to add conda-forge as a channel when upgrading (add -c conda-forge as a flag) or any other channel you find that contains your package if you really need this new version. If you do that, do it as a last resort and after all packages have been installed with conda. But be aware that pip also installs packages if dependency conflicts exist and that it usually breaks your conda environment in the sense that you cannot reliably install with conda anymore. It is possible to install with pip, since more packages are available in pip. To add: maybe it could work but a newer version of X working with Y > 5.0 is not available in conda. That's why you 'cannot' upgrade them all. Conda usually warns very explicitly if they occur. Dependency conflictsīut it is possible that there are dependency conflicts (which prevent a further upgrade). Conda always tries to upgrade the packages to the newest version in the series (say Python 2.x or 3.x). TL DR: dependency conflicts: Updating one requires (by it's requirements) to downgrade another
0 Comments
Leave a Reply. |