运行 指定 Python 路径的 Salt minion

Run Salt minion specifying the Python path

有什么方法可以指定必须用于 运行 salt-minion 的 python 解释器吗?

我在本地网络上有几个 salt minions 运行ning。 它们中的大多数工作正常,但一些 minions 抛出错误,我们猜测 minion 是 运行 python 3 而不是 python 2(我们需要使用 salt-2018.3.4-py2

如果我 运行 python --version 它说版本是 3.7。我们如何强制 minion 使用 python 2.7?

谢谢。

我会说这直接取决于你的安装包。如果你安装了 salt-2018.3.4-py2 这意味着它将 运行 与 py2.

在我的 minion 上,安装了 salt-2019.2-py3,我有

$ python -V
Python 2.7.13
$ salt-minion --versions
Salt Version:
           Salt: 2019.2.0

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.5.3
      docker-py: Not Installed
          gitdb: 2.0.0
      gitpython: 2.1.1
          ioflo: Not Installed
         Jinja2: 2.9.4
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.8
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.5.3 (default, Sep 27 2018, 17:25:39)
   python-gnupg: Not Installed
         PyYAML: 3.12
          PyZMQ: 16.0.2
           RAET: Not Installed
          smmap: 2.0.1
        timelib: Not Installed
        Tornado: 4.4.3
            ZMQ: 4.2.1

System Versions:
           dist: debian 9.9 
         locale: UTF-8
        machine: x86_64
        release: 4.9.0-9-amd64
         system: Linux
        version: debian 9.9 

$ head -1 /usr/bin/salt-minion 
#!/usr/bin/python3