Conda 4.6 Release
The latest set of major Conda improvements are here, with version 4.6. This release has been stewing for a while and has the feature list to show for it. Let’s walk through some of the major ones.
Activation script initialization
Conda 4.4 introduced new scripts that make activation behavior uniform across operating systems. Where you once had “source activate envname” on unix, and just “activate envname” on windows, Conda 4.4 allowed “conda activate envname”. The problem was that setting up your shell to use this new feature was not always straightforward. Conda 4.6 adds extensive initialization support so that more shells than ever before can use the new “conda activate” command.
For more information, read the output from “conda init –help”
We’re especially excited about this new way of working, because removing the need to modify PATH makes Conda much less disruptive to other software on your system.
Support for more shells
Conda’s issue tracker is currently on issue 8000 or so. Conda 4.6.0 is finally fixing issue #626 by adding support for PowerShell! We’ve wanted this support for a long time, and we’re happy to officially support PowerShell. In addition to PowerShell, the new “conda init” functionality helps get Conda working more quickly and less disruptively on a wide variety of shells (bash, zsh, csh, fish, xonsh, and more).
Improving interoperability with pip
Conda and pip have historically had difficulties getting along. Pip hasn’t respected Conda’s environment constraints, while Conda has been all too happy to clobber pip-installed software. It’s a mess. Conda 4.6.0 adds preview support for better interoperability. With this interoperability, Conda can use pip-installed packages to satisfy dependencies, and can even remove pip-installed software cleanly and replace them with Conda packages when appropriate. There’s still room for improvement before pip and Conda are hunky-dory BFFs, but we hope this is a good start.
This feature is disabled by default right now because it can significantly impact Conda’s performance. If you’d like to try it, you can set this condarc setting:
conda config --set pip_interop_enabled True
We’ll continue to work to improve the performance of this feature, as well as develop further features to improve the overall experience of working with both Conda and pip in the same space.
Even without activating this feature, Conda understands pip metadata much more intelligently. For example, if we create an env with Conda:
conda create -y -n some_pip_test python=3.7 imagesize=1.0
Then we update imagesize in that env using pip:
conda activate some_pip_test pip install -U imagesize
Where Conda 4.5.12 shows a confusing ambiguity on exactly what’s present in “conda list”:
imagesize 1.1.0 imagesize 1.0.0 py37_0
Conda 4.6 now shows only one entry for imagesize (the newer pip entry):
imagesize 1.1.0 pypi_0 pypi
As the size of the package ecosystem has grown, Conda has felt slower and slower. We’ve done several things in Conda 4.6 to improve Conda’s speed. You can review our benchmark results at https://conda.github.io/conda-benchmarks/ to see how we’re progressing over time. There’s more to do, but we hope you’ll notice things going faster. We’ll be posting a follow-up blog soon on how we achieved some of our recent speedups. One new experimental feature is the ability to swap out solver implementations. To try out the cryptominisat solver, you can do these steps:
conda install pycryptosat conda config --set sat_solver pycryptosat
Here’s a simple benchmark using the different solver implementation on a linux-64 system:
time conda create --dry-run -n conda_forge_r -c conda-forge r-essentials
|Pycosat 0.6.3||Pycryptosat 5.6.6|
|147 sec||112 s|
Please give it a try, and let us know how it works for you. If you experience errors, file issues on the github issues tracker (https://github.com/conda/conda/issues), and please join us on gitter (https://gitter.im/conda/conda) for kudos or more general discussion.
In parallel to the speedups in the Conda 4.6 series, the conda-forge community has been exploring ways to reduce the size of the problem that the Conda solver needs to look at. There’s a very promising project, conda-metachannel, which is described in a blog post by Marius van Niekerk at: https://email@example.com/conda-metachannel-f962241c9437. If you’re frustrated by the solve time even after updating to the latest Conda, take a look at Marius’ blog post.
These are the major highlights of the 4.6 release. For more info on other features and fixes, including “conda run,” environment stacking, benchmarking, and links to how the aforementioned improvements have been made, please check the changelog: https://github.com/conda/conda/releases/tag/4.6.0. Because we identified a few issues with the 4.6.0 release in our early release program (the conda-canary channel), 4.6.0 packages are actually not available. The first official Conda release is 4.6.1, which has release notes at https://github.com/conda/conda/releases/tag/4.6.1. You can get the very latest with a simple update command:
conda update conda
Followed by a simple command to install the new shell support:
Now, open up a new shell session, and you’ll be using all the new capabilities of Conda 4.6.