Open PhilipYip1988 opened 2 years ago
I assume they have a reason for the default. It might pay to look up "conda init" and see when they suggest people use it in their documentation.
But I agree, my expectation would be to default to "yes" so most users would get a typical, functional installation without trying too hard (hitting enter after triggering install). This is a total outsider and new user perspective, not knowing what each state is useful for.
Also I'd assume those URL's at the top of the bug template are to help you, and don't add to the bug if you file it here. I'd remove them to make your bug easier to parse, but that's me.
Thanks, I have removed the template URLs.
Yes I posted this in the mindset of a "total new user perspective" i.e. a new user installing Anaconda on Linux and then being unable to use it because it isn't initialised by default. I made a YouTube video and written guide documenting the installation and got comments by other users that they had made the same mistake when they first tried to install Anaconda. i.e. installing it but pressing enter and resulting in it being installed and not initialised.
It can be fixed by manually editing the .bashrc:
cd ~
nano .bashrc
The following should be included:
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/philip/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/philip/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/philip/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/philip/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
Replacing my username philip with whatever your username is (4 times).
However from a new user perspective who is just getting started with Python, it is an unnecessary hurdle when it comes to installation. Therefore I submitted this as a bug, so hopefully it can be addressed.
The above proposition, namely to add a PATH-changing snippet into .bashrc is totally the wrong way to solve this little problem. The installation of an individual software package, which anaconda is, should never tinker with the global configuration of any user. I had to struggle with this behaviour myself, on a multi-user system: The admin installed anaconda, had his .bashrc changed, and that had negative implications on the rest of the system: The changed PATH took incompatible binaries from anaconda instead of taking it from the system.
Moreover, it had not the wanted effect for any other user on the system.
Here is how it should be done: Make anaconda a bash script, change PATH locally inside the script, and launch the binary inside the script. If done this way, there are no unwanted side-effects to the rest of the system, and it works for all users.
Edit: I forgot to mention that other users of anaconda had problems with this PATH-changing snippet. See these bug reports: https://github.com/ContinuumIO/anaconda-issues/issues/9138 https://github.com/phw/peek/issues/304#issuecomment-380164779
Actual Behavior
The last step of the Anaconda Install on Linux states:
done installation finished. Do you wish the installer to intialize Anaconda3 by running conda init? [yes|no] [no] >>>
If the user presses enter, the default option no is selected (which is a really bad default option). This should not be the default option, as it installs Anaconda leaving it in an unusable state. This can create some confusion for new users who are installing Anaconda for the first time.
Expected Behavior
This stage of the installation should be in an infinite while loop like the license agreement, and break only when the user specifically types in yes or no.
Steps to Reproduce
Begin the Anaconda installation in Linux and press enter when asked Do you wish the installer to intialize Anaconda3. conda commands do not work when in this state so the info is given from an install that has been initialized.
Anaconda or Miniconda version:
Anaconda3-2021.11-Linux-x86_64.sh
Operating System:
Ubuntu 22.04 LTS
conda info
conda list --show-channel-urls