I'm using conda to run tests against different versions of python, numpy, etc., but there are some common dependencies for all combinations of python/numpy. Is there a way to install such packages into all conda environments, or do I have to specify each by hand?
Go to Environments tab just below the Home tab and from there we can check what all packages are installed and what is not. It is very easy to install any package through anaconda navigator, simply search the required package, select package and click on apply to install it.
I'd like to mention one more thing here. While you can have multiple environments that contain different versions of Python at the same time on the same computer, you can't set up 32- and 64-bit environments using the same Conda management system.
Usually you would open the anaconda navigator, then go to Enviroments on the left side, then at the bottom you would click "Add" to add a new enviroment. after that you click on the newly created enviroment and "open terminal". in that terminal you use: conda install -c anaconda numpy .
While still in beta, conda 4.6. 0 allows conda to consider pip installed packages and either replace these packages as needed or fulfill dependencies with the existing package.
You can run a shell loop over the output of conda env list
. For example:
for env in $(conda env list | cut -d" " -f1 | tail -n+4); do conda install -n $env XXXXXX; done
Instead of using a for
loop in @abalter's answer, you can do it with xargs too.
Note, this will only work for environment names without spaces:
conda env list | cut -d" " -f1 | tail -n+4 | xargs -L 1 conda install YOUR_PACKAGE -n
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