ContinuumIO / anaconda-issues

Anaconda issue tracking
646 stars 220 forks source link

anaconda3 install error: raise Exception("dst exists: %r" % dst) #10851

Open xylona1900 opened 5 years ago

xylona1900 commented 5 years ago

I installed anaconda3 on WSL(Ubuntu 18.04 on Windows) with the command line:

sudo bash Anaconda3-2019.03-Linux-x86_64.sh /mnt/e/biosf/anaconda3

Installer runs and aborts with this error:

PREFIX=/mnt/e/biosf/anaconda3 installing: python-3.7.3-h0371630_0 ... Python 3.7.3 installing: conda-env-2.6.0-1 ... installing: blas-1.0-mkl ... installing: ca-certificates-2019.1.23-0 ... installing: intel-openmp-2019.3-199 ... installing: libgcc-ng-8.2.0-hdf63c60_1 ... installing: libgfortran-ng-7.3.0-hdf63c60_0 ... installing: libstdcxx-ng-8.2.0-hdf63c60_1 ... installing: bzip2-1.0.6-h14c3975_5 ... installing: expat-2.2.6-he6710b0_0 ... installing: fribidi-1.0.5-h7b6447c_0 ... installing: gmp-6.1.2-h6c8ec71_1 ... installing: graphite2-1.3.13-h23475e2_0 ... installing: icu-58.2-h9c2bf20_1 ... installing: jbig-2.1-hdba287a_0 ... installing: jpeg-9b-h024ee3a_2 ... installing: libffi-3.2.1-hd88cf55_4 ... installing: liblief-0.9.0-h7725739_2 ... installing: libsodium-1.0.16-h1bed415_0 ... installing: libtool-2.4.6-h7b6447c_5 ... installing: libuuid-1.0.3-h1bed415_2 ... installing: libxcb-1.13-h1bed415_1 ... installing: lz4-c-1.8.1.2-h14c3975_0 ... installing: lzo-2.10-h49e0be7_2 ... installing: mkl-2019.3-199 ... installing: ncurses-6.1-he6710b0_1 ... Traceback (most recent call last): File "/mnt/e/biosf/anaconda3/pkgs/.install.py", line 599, in main() File "/mnt/e/biosf/anaconda3/pkgs/.install.py", line 581, in main link_dist(opts.link_dist) File "/mnt/e/biosf/anaconda3/pkgs/.install.py", line 456, in link_dist link(prefix, dist, linktype) File "/mnt/e/biosf/anaconda3/pkgs/.install.py", line 345, in link raise Exception("dst exists: %r" % dst) Exception: dst exists: '/mnt/e/biosf/anaconda3/share/terminfo/e/eterm'

I don't know how to resolve it, what's wrong with it?

msarahan commented 5 years ago

WSL is a case-insensitive filesystem. There are paths that are differentiated only by case. You have to install the linux installer onto a filesystem that is case sensitive. This probably means you shouldn't install it to /mnt/anything - only stuff in the native system that WSL provides you (~/anaconda3 should work).

You can change case sensitivity for Windows with a setting. That's left as an exercise for the reader if you insist on keeping things on your Windows drives.

samuliasmala commented 5 years ago

There is an excellent blog post about the topic but to summarize if you want to install Anaconda under /mnt you can either mount the drives using case=dir option in /etc/wsl.conf:

[automount]
options = "case=dir"

or alternatively use setfattr from attr package to set the directory where anaconda3 subdirectory is created case sensitive. The new anaconda3 subdirectory will inherit the property.

$ sudo apt install attr
$ setfattr -n system.wsl_case_sensitive -v 1 /mnt/e/biosf
czeoli-phd commented 5 years ago

Get the same error as xylona1900, psuedo-recap follows: $ bash Anaconda3-2019.03-Linux-x86_64.sh

set path (Used suggested path, i.e. "/mnt/c/Users/MyName/anaconda3" here) successful download ... successful download ... ... Exception! (same as xylona1900 posted above)

Trying samuliasmala's remedy, I get the following error/response: $ getfattr -n system.wsl_case_sensitive test

   test: system.wsl_case_sensitive: Operation not supported

Note: the "test/" directory could be anything and get vs. set leads to the same error/response

msarahan's answer appears to be winning. Thank you and darn!

Most recent blogs, which will be bringing people down this path: setting-up-a-data-science-environment-using-wsl using-wsl-for-data-science

Thanks in advance for any resolution to this issue.

samuliasmala commented 5 years ago

The system.wsl_case_sensitive flag comes in Windows 10 insider build 17692, do you have that or newer? If yes then unfortunately I don't know what is the problem.

czeoli-phd commented 5 years ago

samuliasmala - Thanks for the follow-up (I meant to follow-up with that but couldn't find this post).

Yes, my issue was that I'm not working with the same build, I have:

Windows 10 Enterprise, v1803, OS Build 17134.765

I've been talking w/ admin since to see about this 17692 insider build; I don't think it will get approved. Thx!!

selrahc commented 5 years ago

I had the same error few days ago (i.e., Exception: dst exists). Here is how I resolved it.

  1. Open Command Prompt (run it as administrator)
  2. Change directory to where we want to install anaconda3 (e.g., c:\anaconda3)
  3. Type "fsutil file setCaseSensitiveInfo . enable"
  4. Open WSL
  5. Run Anaconda installer with -u argument to update an existing installation, though we have an empty directory of /mnt/c/anaconda3 (e.g., bash Anaconda3-2019.03-Linux-x86_64.sh -u)

Hope it helps.

Ref. https://devblogs.microsoft.com/commandline/per-directory-case-sensitivity-and-wsl/

Zhaoyilunnn commented 3 years ago

There is an excellent blog post about the topic but to summarize if you want to install Anaconda under /mnt you can either mount the drives using case=dir option in /etc/wsl.conf:

[automount]
options = "case=dir"

or alternatively use setfattr from attr package to set the directory where anaconda3 subdirectory is created case sensitive. The new anaconda3 subdirectory will inherit the property.

$ sudo apt install attr
$ setfattr -n system.wsl_case_sensitive -v 1 /mnt/e/biosf

Thanks, the answer is very useful. I would suggest that one should create a new dir when using setfattr, in my case when I set the dir where I installed my apps case sensitive, it made my shortcut icons unable to show normally.