【问题标题】:Why is -bash: PATH: command not found displayed when I open my terminal window?为什么打开终端窗口时显示 -bash: PATH: command not found?
【发布时间】:2013-01-03 14:01:31
【问题描述】:

我安装了 EPD Free 7.3.2,它运行良好,直到我想修改 PATH 以指向我的 Python 脚本所在的位置。我放弃了,恢复到原来的 .bash_profile 文件。

# Setting PATH for EPD_free-7.3-2
# The orginal version is saved in .bash_profile.pysave
PATH = "/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
export PATH

启动终端时,我得到这个:

Last login: Thu Jan  3 08:50:20 on ttys000
-bash: PATH: command not found

但是,我可以运行 iPython 和 EPD 附带的所有库,而不会出现问题。有人知道“PATH: command not found”有什么问题吗?

【问题讨论】:

    标签: osx-lion epd-python


    【解决方案1】:

    = 周围的空格是个问题。使用这个作业:

    PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
    

    【讨论】:

      【解决方案2】:

      你需要去掉=周围的空格:

      PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
      

      否则,您将尝试以="/Library..." 作为其参数运行(不存在的)命令PATH

      【讨论】:

        猜你喜欢
        • 2014-10-07
        • 1970-01-01
        • 2022-10-15
        • 1970-01-01
        • 2022-12-17
        • 2019-07-07
        • 2019-12-11
        • 2021-06-22
        • 2014-07-01
        相关资源
        最近更新 更多