【问题标题】:SL CLI Broken after upgrading to 5.1.0升级到 5.1.0 后 SL CLI 损坏
【发布时间】:2016-09-14 06:37:39
【问题描述】:

最近从版本 4.* 升级到 SoftLayer API 版本 5.1.0。现在,当我尝试使用它时,我得到以下错误输出。我假设这与正在使用的 python 版本有关,但对 Python 来说还很新,并且阅读 RHEL 中的 Python 版本是多么危险,我一直在犹豫是否要进行更改。

$ slcli
Traceback (most recent call last):
File "/usr/bin/slcli", line 7, in <module>
    from SoftLayer.CLI.core import main
File "/usr/lib/python2.6/site-packages/SoftLayer/__init__.py", line 20, in <module>
    from SoftLayer.API import * # NOQA
File "/usr/lib/python2.6/site-packages/SoftLayer/API.py", line 11, in <module>
    from SoftLayer import config
File "/usr/lib/python2.6/site-packages/SoftLayer/config.py", line 11, in <module>
    from SoftLayer import utils
File "/usr/lib/python2.6/site-packages/SoftLayer/utils.py", line 63
    for key, val in self.items()}
      ^
SyntaxError: invalid syntax

机器信息-

  • RHEL 6.7
  • 来自 /usr/lib/python2.6/site-packages (python 2.6) 的 pip 8.1.2

【问题讨论】:

    标签: ibm-cloud-infrastructure


    【解决方案1】:

    请查看适用于 Python 2.7、3.3 或更高版本的 Soflayer Python API 客户端的系统要求。我建议您将 Python 升级到 2.7.9 或更高版本。

    【讨论】:

      【解决方案2】:

      对于遇到此问题的其他人,我按照这些说明将 python 34 与 2.6 版本并排安装,并且现在 sl cli 可以工作

      https://stackoverflow.com/a/32250834/6348212

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2014-12-14
        • 2016-01-20
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-09-14
        相关资源
        最近更新 更多