Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing anaconda to different folder from home on Linux

Tags:

linux

anaconda

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?

like image 329
user3226932 Avatar asked Apr 27 '17 22:04

user3226932


People also ask

Can I install Anaconda in different directory?

By default Anaconda installs into the home directory of the user, but you can easily configure it to install to a different location.

Where should Anaconda be installed on Linux?

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.

How do I install Anaconda on another drive?

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.


2 Answers

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.

like image 168
José Avatar answered Nov 15 '22 07:11

José


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.

like image 24
Yogesh Awdhut Gadade Avatar answered Nov 15 '22 06:11

Yogesh Awdhut Gadade