- at 50 Mbps on a modern computer, the 50 MB download including install takes about 30 seconds ;-)
- https://github.com/conda/conda/blob/master/CHANGELOG.md#440-2017-12-20
- Usage: copy one of the two following lines and paste it into your terminal
v=2; f=Miniconda${v}-latest-MacOSX-x86_64.sh; cd $TMPDIR; { curl -LfOsS https://repo.anaconda.com/miniconda/$f ; cd -; } && bash $TMPDIR/$f -b && echo ". ~/miniconda${v}/etc/profile.d/conda.sh" >> ~/.bash_profile; . ~/miniconda${v}/bin/activate
v=3; f=Miniconda${v}-latest-MacOSX-x86_64.sh; cd $TMPDIR; { curl -LfOsS https://repo.anaconda.com/miniconda/$f ; cd -; } && bash $TMPDIR/$f -b && echo ". ~/miniconda${v}/etc/profile.d/conda.sh" >> ~/.bash_profile; . ~/miniconda${v}/bin/activate
conda deactivate; rm -rf /Users/christian/miniconda{2,3}; sed -i.bak '/. ~\/miniconda*/d' ~/.bash_profile
# Python version 2 or 3
v=3;
# Download latest miniconda 64 bit
f=Miniconda${v}-latest-MacOSX-x86_64.sh;
# Use a temporary dir such as: /var/folders/9l/wwt.../T/
cd $TMPDIR;
# Use Curl as macOS does not come with wget
# Options: curl --location --fail --remote-name --silent --show-error
# switch back to previous dir
{ curl -LfOsS https://repo.anaconda.com/miniconda/$f ; cd -; } &&
# Use the miniconda installer to install in silent mode
bash $TMPDIR/$f -b &&
# Add miniconda to the PATH, while not enabling auto-activation in every shell
echo ". ~/miniconda${v}/etc/profile.d/conda.sh" >> ~/.bash_profile;
# Activate a virtual environment in the current shell
. ~/miniconda${v}/bin/activate
- To activate manually in another shell use
~/miniconda3/bin/activate - To create another virtual environment and activate / list / deactivate
conda create --name project1
conda activate project1
conda info --envs
...
conda deactivate
The only difference is, that this will add a much bigger section to the .bash_profile, which by default auto-activates the base environment in every shell, unless you disable that, as done below.
- based on: https://docs.anaconda.com/anaconda/install/mac-os/#using-the-command-line-install
- and https://docs.anaconda.com/anaconda/install/silent-mode/
v=2; f=Miniconda${v}-latest-MacOSX-x86_64.sh; cd $TMPDIR; { curl -LfOsS https://repo.anaconda.com/miniconda/$f ; cd -; } && bash $TMPDIR/$f -b && . ~/miniconda${v}/bin/activate && conda init && conda config --set auto_activate_base false
v=3; f=Miniconda${v}-latest-MacOSX-x86_64.sh; cd $TMPDIR; { curl -LfOsS https://repo.anaconda.com/miniconda/$f ; cd -; } && bash $TMPDIR/$f -b && . ~/miniconda${v}/bin/activate && conda init && conda config --set auto_activate_base false