Research
Anaconda on Linux, root can't activate my env
Shakeratto
2020. 10. 18. 17:06
When we install anaconda, we can change the default path to be installed to the custom path such as below
/home/[user_name]/anaconda3/
to
/opt/anaconda3 or ~/anaconda3
If we use the default path after anaconda is installed,
root user can't activate my environment because the default path is only for the [user_name]
Here is a solution.
1. Open .bashrc file
vi ~/.bashrc
2.Add below text at the bottom of the .bashrc file and save it
export PATH="/home/[user_name]/anaconda3/bin:$PATH"
3. Try to activate your environment after "sudo su"
----------------------------------------------------------------------