【发布时间】:2019-10-17 03:03:27
【问题描述】:
每当我打开 git bash 时,我都会收到以下警告:
bash: C:/Users/RS3/Anaconda3/etc/profile.d/conda.sh: No such file or directory
问题是我卸载了Anaconda,因为我安装了独立的python,导致报错。
如何删除此警告。
【问题讨论】:
标签: bash git anaconda conda git-bash
每当我打开 git bash 时,我都会收到以下警告:
bash: C:/Users/RS3/Anaconda3/etc/profile.d/conda.sh: No such file or directory
问题是我卸载了Anaconda,因为我安装了独立的python,导致报错。
如何删除此警告。
【问题讨论】:
标签: bash git anaconda conda git-bash
要删除该警告,只需使用 nano 命令擦除 .bashrc 文件中的文件路径字符串。方法如下:
删除该警告的步骤:
~/.bashrc 检查 .bashrc 位置。nano .bashrc
C:/Users/RS3/Anaconda3/etc/profile.d/conda.sh 的字符串
当您重新打开 git bash 时,不会出现任何内容,因为 .bashrc 中不再包含该路径。此外,如果 conda 命令在之前有效,则在删除此内容后仍将继续有效。
【讨论】:
查看~/.bashrc的内容(原为mentioned here)
也许(或~/.profile、mentioned here)包含用于旧 uni 卸载程序的命令。
删除这些行,然后尝试再次打开 git bash 会话。
【讨论】: