繁体   English   中英

-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命令修改了文件。

我将发布修改后的.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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM