I noticed that NLP people like to use conda to manage python project packaging. I mainly used python virtual environments for my projects. Would be good to find out in the future what conda does better. Below is just basics on installing conda.
Step 1
:
Go to the installer page:
https://docs.conda.io/en/latest/miniconda.html
For MacBook Pro I downloaded the version below:
MacOSX
Miniconda3 macOS Apple M1 64-bit bash (Py38 conda 4.10.1 2021-11-08) 4ce4047065f32e991edddbb63b3c7108e7f4534cfc1efafc332454a414deab58
Step 2
: Check that you got the file
np@Ns-MacBook-Pro ~ % ls Downloads
Miniconda3-latest-MacOSX-arm64.sh
Step 3
: install
np@Ns-MacBook-Pro ~ %
np@Ns-MacBook-Pro ~ % ./Downloads/Miniconda3-latest-MacOSX-arm64.sh
zsh: permission denied: ./Downloads/Miniconda3-latest-MacOSX-arm64.sh
np@Ns-MacBook-Pro ~ % chmod +x Downloads/Miniconda3-latest-MacOSX-arm64.sh
np@Ns-MacBook-Pro ~ % ./Downloads/Miniconda3-latest-MacOSX-arm64.sh
partial output:
Miniconda3 will now be installed into this location:
/Users/np/miniconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/Users/np/miniconda3] >>>
PREFIX=/Users/np/miniconda3
Unpacking payload ...
partial output:
==> For changes to take effect, close and re-open your current shell. <==
If you'd prefer that conda's base environment not be activated on startup,
set the auto_activate_base parameter to false:
conda config --set auto_activate_base false
Thank you for installing Miniconda3!
Step 4
: restart your computer
Optional:
To check run:
(base) np@Ns-MacBook-Pro ~ % which -p conda
/Users/np/miniconda3/bin/conda
DON’T DO: which conda
doesn’t work. I got the following error, do which -p conda
(base) np@Ns-MacBook-Pro Downloads % which conda
conda () {
if [ "$#" -lt 1 ]
then
"$CONDA_EXE" $_CE_M $_CE_CONDA
else
\local cmd="$1"
shift
case "$cmd" in
(activate | deactivate) __conda_activate "$cmd" "$@" ;;
(install | update | upgrade | remove | uninstall) CONDA_INTERNAL_OLDPATH="${PATH}"
__add_sys_prefix_to_path
"$CONDA_EXE" $_CE_M $_CE_CONDA "$cmd" "$@"
\local t1=$?
PATH="${CONDA_INTERNAL_OLDPATH}"
if [ $t1 = 0 ]
then
__conda_reactivate
else
return $t1
fi ;;
(*) CONDA_INTERNAL_OLDPATH="${PATH}"
__add_sys_prefix_to_path
"$CONDA_EXE" $_CE_M $_CE_CONDA "$cmd" "$@"
\local t1=$?
PATH="${CONDA_INTERNAL_OLDPATH}"
return $t1 ;;
esac
fi
}
Comments
Post a Comment