anaconda在linux下的安装注意事项
不应该做什么
官网原文:
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"