python-3.x - 在 macOS 上安装 anaconda 后出现终端 -bash 别名错误
问题描述
我有一台装有 macOS Mojave 10.14.6 (18G95) 的 MacBook Pro
我在我的系统上安装了带有 python 的 Anaconda。
从那时起,每当我打开终端时,我都会收到这些消息。
Last login: Sat Oct 5 22:53:55 on console
You have new mail.
bash: alias: added: not found
-bash: alias: by: not found
-bash: alias: Anaconda3: not found
-bash: alias: 2019.07: not found
-bash: alias: installer: not found
(base) Ayushs-MacBook-Pro:~ Ayush$
安装 Anaconda 不知何故弄乱了我的 .bash_profile。
这些是我的 .bash_profile 的内容
# Homebrew
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/sbin:$PATH
export GOOGLE_APPLICATION_CREDENTIALS=/Users/Ayush/Downloads/ayush-profectus-b02fa250957f.json
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/Ayush/Downloads/google-cloud-sdk/path.bash.inc' ]; then source '/Users/Ayush/Downloads/google-cloud-sdk/path.bash.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/Users/Ayush/Downloads/google-cloud-sdk/completion.bash.inc' ]; then source '/Users/Ayush/Downloads/google-cloud-sdk/completion.bash.inc'; fi
# for complier
export PATH=/usr/local/Cellar/gcc/8.2.0/bin:$PATH
alias gcc='gcc-8'# added by Anaconda3 2019.07 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/Users/Ayush/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/Users/Ayush/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/Ayush/anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/Users/Ayush/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<
这是什么意思?无论如何它会妨碍我的系统,我该
如何删除它?
解决方案
更改此行:
alias gcc='gcc-8'# added by Anaconda3 2019.07 installer
到
alias gcc='gcc-8'
# added by Anaconda3 2019.07 installer
推荐阅读
- angular - D3 NGX 折线图在不应该有高度时出现
- c - 与 C 中的其他方法相比,将字符串实现为带有空标记的字符数组背后的决定的原因是什么?
- javascript - Vuetify js 优化与 Nuxt JS
- java - 使用java处理大型CSV文件的有效方法
- javascript - 单击按钮时未定义(文本框值)
- php - 无法在 WooCommerce 中更新可变产品数据
- java - 为什么此应用程序中的 Toast 不显示任何内容?
- html - 当 CSS Grid 达到一定大小时,它会自动换行
- python - 从数据库中读取文件会出现错误 TypeError: 'NoneType' 类型的对象没有 len()
- appium - 如何使用 appium 在两个本机应用程序之间切换