2

I'm working in Windows 10 with a fresh installation of Anaconda and Git Bash. I decided to set cmd.exe as my default console program to use git bash (instead of the minTTY), and I think already I am getting issues with Unix style characters vs Windows.

When I fire up cmd Bash tells me it can't find my conda.sh file:

bash: C:UsersjoshuAnaconda3/etc/profile.d/conda.sh: No such file or directory

First, it looks like bash is missing the default windows slashes for my root directory ("C:/Users/joshu/"). Does anyone know how to fix this?

Thanks

Robin Green
  • 32,079
  • 16
  • 104
  • 187
Joshua Zastrow
  • 1,355
  • 4
  • 17
  • 32
  • I'd guess it's related to the old pitfall that Windows uses `\ ` for directory separation, while Unix uses `/`. I can't tell you where to look exactly on Windows for this, but try to find where Bash has stored where your `conda.sh` file is stored, and have a look at the type of slashes used there. – Wanderer May 06 '18 at 17:17

4 Answers4

3

I have the exact same problem. Run ~/.bashrc in a terminal. Go to the path given and correct the conda.sh path.

In your case, you will replace the C:\Users\joshu\Anaconda3/etc/profile.d/conda.sh to C:/Users/joshu/Anaconda3/etc/profile.d/conda.sh Your only problem is that your slashes are set wrong.

1

Fix this issue by opening ~/.bashrc and change location of conda.sh, e.g. in my case
. D:/Users/my_user/ProgramFile/Continuum/anaconda3/etc/profile.d/conda.sh

macchiavalley
  • 517
  • 1
  • 5
  • 12
0

Had the same problem on Windows 10/Git Bash/Anaconda installation. If you run ~/.bashrc in Git Bash, it should give you the location of the shell script file containing the incorrect path. Once you correct the path in that file, the message should disappear when you restart the terminal.

Jieun Rim
  • 11
  • 2
0

Another thing to check is make sure your user profile folder under C:\Users has not gone hidden. If it has gone hidden, then the C:\Anaconda\etc\profile.d\conda.sh script won't be able to find the folder.

DonAriston
  • 101
  • 1
  • 5