I just installed Ubuntu. I downloaded the anaconda python package and am trying to install it,
bash Anaconda-2.1.0-Linux-x86_64.sh
at some point the terminal says:
Anaconda will now be installed into this location:
/home/*username*/anaconda
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify an different location below
So I wanted to install in /opt
(which I heard was an appropriate directory), but the terminal then says:
mkdir: cannot create directory ‘/opt/anaconda’:Permission denied
ERROR: Could not create directory: /opt/anaconda
I don't see how I can use sudo
here as the installer runs then mkdir
. I tried making the directory myself first, bit then it gives the fact that the dir exists as an error. What can I do?
So I wanted to install in
/opt
The /opt
directory is root owned, normal users can't write in it. As long as you tell anaconda that you want to install in directories that non-root users cannot write, you must use elevated privileges. When you start the installer, you must use sudo from the start:
sudo bash Anaconda-2.1.0-Linux-x86_64.sh
[...]
Anaconda will now be installed into this location:
/home/user/anaconda
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify an different location below
[/home/user/anaconda] >>> /opt/anaconda
Anaconda doesn't write anything before that, so you can rest assured.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments