I want to install Anaconda to a different path such as /opt on my linux server, but I keep getting ERROR: File or directory already exists: /opt, even though there's no files or directory in there. It won't let me install unless I install it in the home folder, any ideas why and how to resolve this problem?
By default Anaconda installs into the home directory of the user, but you can easily configure it to install to a different location.
After agreeing to the license terms, the next prompt will ask you to enter the directory where you want to install the Anaconda Python on your Ubuntu machine. The default location is the user's HOME directory on Ubuntu.
To move Anaconda from one directory to another: OPTIONAL: Save your environments using the conda managing environments instructions. Uninstall Anaconda. Go to the new directory and install it there following the Anaconda installation instructions.
You need to give also the name of the folder that it will create, like:
/opt/anaconda3
anaconda3 folder doesn't exist yet, but the installer will create it.
At the time of installation of the anaconda it will ask for the path where anaconda to be installed as follows:
Do you accept the license terms? [yes|no]
Please answer 'yes' or 'no':'
>>> yes
Anaconda3 will now be installed into this location:
/root/anaconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
Here we press enter if you want to install it in root/. But if you want to install anaconda into another dir. you can specify the path and anconda3 as the dir name in it as follows:
[/root/anaconda3] >>> /opt/anaconda3
press Enter. You will see the following as the output in the terminal:
PREFIX= /opt/anaconda3
installing: python-3.6.3-hc9025b9_1 ...
It means it started installing the anaconda on the specified path/dir i.e. in /opt/anaconda3. complete the installation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With