安装 watson-machine-learning-client 时出错

error in installing watson-machine-learning-client

关于使用命令 pip install watson-machine-learning-client

终端抛出错误,这是终端的输出:

pip install watson-machine-learning-client
Collecting watson-machine-learning-client
  Using cached https://files.pythonhosted.org/packages/7a/ea/75de2fe2373cb3d2f0c7342b35956c4df62fce5a312cfd652a339bfb97a0/watson_machine_learning_client-1.0.357.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/l0/8fv181bn3nb6fdrnyk87j7qc0000gn/T/pip-install-oRyoix/watson-machine-learning-client/setup.py", line 30, in <module>
        with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
    TypeError: 'encoding' is an invalid keyword argument for this function

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/l0/8fv181bn3nb6fdrnyk87j7qc0000gn/T/pip-install-oRyoix/watson-machine-learning-client/

您正在使用 python 2 安装软件包,该软件包在 PyPi. As you can see on the official homepage(要求部分)上被错误地列为支持 python 2:

Watson Machine Learning service instance, you can create instance using this link. Only Python 3.5 or newer is supported.

您可以尝试将代码反向移植到 python 2,但我更愿意在这里使用 pyhton 3。