8/28/2023 0 Comments Anaconda update packages![]() To avoid this, simply create a new environment in Anaconda.īe frugal, install only what you need. Imagine the dependency graph of packages, when the number of packages grows large, the chance of encountering a conflict when upgrading/adding packages is much higher. Or via api like nix-shell -p nixFlakes -run "nix run github:davhau/mach-nix#.bokeh.scikit-learn "įinally if you really need to work with packages that are not compatible due to its dependencies, it is possible with technologies like NixOS/nix-pkgs. Or as a very good Python (advanced) environment you can use mach-nix (with nix) like mach-nix env. in this case Python3.7 (for sure you can change the version) On Linux / macOS you could use nix like nix-env -iA nixpkgs.python37 It resolves and builds environments best. Next you can clone and update: conda create -n p圓56 -clone p圓5Ĭonda config -set pip_interop_enabled True # for conda>=4.6Ĭurrently I would use mamba (or micromamba) as conda pkg-manager replacementīecause the idea of conda is nice but it is not working out very well for complex environments I personally prefer the combination of nix-shell (or lorri) and poetry ( intro poetry2nix).Īlternatively you can use nix and mach-nix (where you only need you requirements file. (but even so there is not always a link to the source available - like for jupyterlab extensions) ![]() If you need it nevertheless you are saver to test this in a cloned environment.įirst step should always be to backup your current specification: conda list -n p圓5 -explicit If later on you want to ignore the file in your env for an update, you can do: conda update -all -no-pin If you only want to update almost all, you can create a pin file echo "conda =4.0.0" > ~/miniconda3/envs/p圓5/conda-meta/pinnedĮcho "numpy 1.7.*" > ~/miniconda3/envs/p圓5/conda-meta/pinnedīefore running the update. Because conda tries to resolve the relationship of dependencies between all packages in your environment, this can lead to DOWNGRADED packages without warnings. This does not lead to an update of all packages by nature. *PLEASE read the docs before executing "update -all"! is it really the virtual environment he wants to update or could Wang get what he/she wants with conda update -n ENVIRONMENT -all 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." So upgrading Y > 5.0 implies downgrading X to major and minor. 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. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |