-bash:设置:找不到命令
-bash: Setting: command not found
每次我打开终端我都会收到这条消息:
Last login: Sun May 5 18:30:40 on ttys000
-bash: Setting: command not found
Marcos-MacBook-Pro:~ (myname)$
如您所见,我的 bash_profile 有问题:
-bash: Setting: command not found
我相信这是因为我不小心使用 vim
命令修改了文件。
我将 post 修改后的 .bash_profile 文件,希望如果有任何错误,您可以很容易地发现它:
Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
alias python=python3
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
".bash_profile" 7L, 188C
我真的看不出有什么问题,但我是终端机的新手。也许有办法将文件重置为默认值?
您需要注释 .bash_profile
的第一行,因为它现在正在尝试使用 Setting
作为 bash 声明。
您的 .bash_profile
应该是:
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
alias python=python3
每次我打开终端我都会收到这条消息:
Last login: Sun May 5 18:30:40 on ttys000
-bash: Setting: command not found
Marcos-MacBook-Pro:~ (myname)$
如您所见,我的 bash_profile 有问题:
-bash: Setting: command not found
我相信这是因为我不小心使用 vim
命令修改了文件。
我将 post 修改后的 .bash_profile 文件,希望如果有任何错误,您可以很容易地发现它:
Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
alias python=python3
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
".bash_profile" 7L, 188C
我真的看不出有什么问题,但我是终端机的新手。也许有办法将文件重置为默认值?
您需要注释 .bash_profile
的第一行,因为它现在正在尝试使用 Setting
作为 bash 声明。
您的 .bash_profile
应该是:
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
alias python=python3