Windows cmd git bash:conda.sh没有这样的文件或目录(Windows行尾,缺少斜杠) [英] Windows cmd git bash: conda.sh no such file or directory (Windows line endings, missing slashes)
问题描述
我在Windows 10中使用全新安装的Anaconda和Git Bash进行工作.我决定将cmd.exe设置为我的默认控制台程序,以使用git bash(而不是minTTY),而且我认为Unix样式字符与Windows相比已经出现了问题.
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.
当我启动cmd时,Bash告诉我找不到conda.sh文件:
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
首先,看来bash缺少我的根目录("C:/Users/joshu/")的默认Windows斜线.有人知道如何解决这个问题吗?
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?
谢谢
推荐答案
我有完全相同的问题.在终端中运行~/.bashrc
.转到给定的路径并更正conda.sh路径.
I have the exact same problem. Run ~/.bashrc
in a terminal. Go to the path given and correct the conda.sh path.
在您的情况下,您将C:\Users\joshu\Anaconda3/etc/profile.d/conda.sh
替换为C:/Users/joshu/Anaconda3/etc/profile.d/conda.sh
唯一的问题是斜杠设置错误.
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.
这篇关于Windows cmd git bash:conda.sh没有这样的文件或目录(Windows行尾,缺少斜杠)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!