不應該做什么
官網原文:
Installation Instructions
Linux Install
These instructions explain how to install Anaconda on a Linux system.
After downloading the Anaconda installer, run the following command from a terminal:
bash Anaconda-2.x.x-Linux-x86[_64].sh
After accepting the license terms, you will be asked to specify the install location (which defaults to ~/anaconda).
Note: You do NOT need root privileges to install Anaconda, if you select a user writable install location, such as ~/anaconda.* After the self extraction is finished, you should add the anaconda binary directory to your PATH environment variable.
As all of Anaconda is contained in a single directory, uninstalling Anaconda is easy (you simply remove the entire install location directory).
雖然原文里寫You do NOT need root privileges to install Anaconda,其實根本不應該使用root權限(或者sudo)。
如果使用sudo ./Anaconda-2.x.x-Linux-x86[_64].sh的方式安裝,則用戶失去了anaconda文件夾的寫入權限,只剩下執行權限,這樣會導致使用pip或者conda安裝軟件時無法寫入軟件包!!!
安裝程序做了什么
如果是以默認路徑安裝anaconda,安裝程序會在安裝過程中修改~/.bashrc文件,加上了下面一行命令:
export PATH="/home/ric/anaconda/bin:$PATH"
