![]() If Wang does not gives a reproducible example, one can only assist.Į.g. In the documentation you will find "NOTE: Conda updates to the highest version in its series, so Python 2.7 updates to the highest available in the 2.x series and 3.6 updates to the highest available in the 3.x series." To answer more precisely to the question:Ĭonda (which is conda for miniconda as for Anaconda) updates all but ONLY within a specific version of a package -> major and minor. However, since the base environment is also an environment, the answer applies to both cases in the same way. 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. ![]() A way to invoke it without installing mamba is via the -solver=libmamba flag (requires conda-libmamba-solver), as pointed out by matteo in the comments. Update 1: since a while, mamba has proven to be an extremely powerful drop-in replacement for conda in terms of dependency resolution and (IMH experience) finds solutions to problems where conda fails. 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). With Anaconda 2019.07’s newer Anaconda metapackage, conda update -all will make the metapackage go to the custom version in order to update other specs.Ĭonda update -all will only update the selected environment.TL DR: dependency conflicts: Updating one requires (by its requirements) to downgrade another conda update -all may not be able to make everything the latest versions because you may have conflicting constraints in your environment. ![]() If any packages are orphaned by an update, they are removed. In doing so, it drops all the version constraints from the history and tries to make everything as new as it can. This updates all packages in the current environment to the latest version. See all of the available Anaconda versions.Ĭonda update -all will unpin everything. As of conda 4.7, when a package loses its connection to the set of specs that have been requested in the past, it gets removed. conda install anaconda=VERSION-NUMBER may remove packages if the new metapackage that is replacing your old one has removed packages. The “custom” version is lower in version ordering than any actual release number. There is a special “custom” version of the Anaconda metapackage that has all the package dependencies, but none of them are constrained. That metapackage represents a pinned state that has undergone testing as a collection. The below content provides more details about what is happening when you update Anaconda.Ĭonda install anaconda=VERSION-NUMBER grabs the specific release of the Anaconda metapackage for example, conda install anaconda=2022.05.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |