Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows cmd git bash:conda.sh没有这样的文件或目录(Windows行结尾,缺少斜杠)_Windows_Bash_Git_Conda_Git For Windows - Fatal编程技术网

Windows cmd git bash:conda.sh没有这样的文件或目录(Windows行结尾,缺少斜杠)

Windows cmd git bash:conda.sh没有这样的文件或目录(Windows行结尾,缺少斜杠),windows,bash,git,conda,git-for-windows,Windows,Bash,Git,Conda,Git For Windows,我在Windows10中安装了Anaconda和GitBash。我决定将cmd.exe设置为使用git bash(而不是minTTY)的默认控制台程序,我想我已经遇到了Unix样式字符与Windows的问题 当我启动cmd Bash时,它告诉我找不到我的conda.sh文件: bash: C:UsersjoshuAnaconda3/etc/profile.d/conda.sh: No such file or directory 首先,看起来bash缺少我的根目录的默认windows斜杠(“C

我在Windows10中安装了Anaconda和GitBash。我决定将cmd.exe设置为使用git bash(而不是minTTY)的默认控制台程序,我想我已经遇到了Unix样式字符与Windows的问题

当我启动cmd Bash时,它告诉我找不到我的conda.sh文件:

bash: C:UsersjoshuAnaconda3/etc/profile.d/conda.sh: No such file or directory
首先,看起来bash缺少我的根目录的默认windows斜杠(“C:/Users/joshu/”)。有人知道如何解决这个问题吗


谢谢

在安装Windows 10/Git Bash/Anaconda时遇到了同样的问题。如果在Git Bash中运行
~/.bashrc
,它应该会提供包含错误路径的shell脚本文件的位置。更正该文件中的路径后,重新启动终端时,该消息应消失。

通过打开
~/.bashrc
并更改
conda.sh
的位置来解决此问题,例如在我的情况下

。D:/Users/my_user/ProgramFile/Continuum/anaconda3/etc/profile.D/conda.sh
我也有同样的问题。在终端中运行
~/.bashrc
。转到给定的路径并更正conda.sh路径

在您的情况下,您将把
C:\Users\joshu\Anaconda3/etc/profile.d/conda.sh
替换为
C:/Users/joshu/Anaconda3/etc/profile.d/conda.sh

您唯一的问题是斜杠设置错误。

要检查的另一件事是确保
C:\Users
下的用户配置文件文件夹没有隐藏。如果它已隐藏,则
C:\Anaconda\etc\profile.d\conda.sh
脚本
无法找到文件夹。

我猜这与Windows使用
\
进行目录分离,而Unix使用
/
的旧陷阱有关。我无法告诉您在Windows上的具体位置,但请尝试查找Bash在存储
conda.sh
文件的位置,并查看其中使用的斜杠类型。