问题
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
回答1:
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.
回答2:
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.
回答3:
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
回答4:
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.
来源:https://stackoverflow.com/questions/50191033/windows-cmd-git-bash-conda-sh-no-such-file-or-directory-windows-line-endings