【问题标题】:How do I specify which version of python I want to use with make?如何指定要与 make 一起使用的 python 版本?
【发布时间】:2011-05-07 01:20:35
【问题描述】:

如何指定要与 make 一起使用的 python 版本?

【问题讨论】:

    标签: python unix path makefile


    【解决方案1】:

    通常python 是系统默认 Python 版本的名称,但所有已安装的版本也可以使用类似 python2.7python3.2 的名称。您可以在 Makefile 的命令中使用这些名称,也可以将它们放在 Python 脚本的 #! 行中,如果您想以这种方式调用它。

    【讨论】:

      【解决方案2】:

      makefile 只是调用一个命令,您可以通过调用whereis python(在 UNIX 上)或检查 PATH 环境(Windows)来检查正在使用的 python 版本。要覆盖默认的python,您可以使用绝对路径进行调用......反正只是猜测。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-08-11
        • 1970-01-01
        • 1970-01-01
        • 2021-10-21
        • 2017-07-20
        相关资源
        最近更新 更多