【问题标题】:error in installing watson-machine-learning-client安装 watson-machine-learning-client 时出错
【发布时间】:2019-02-13 12:44:54
【问题描述】:

关于使用命令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 pip ibm-watson


    【解决方案1】:

    您正在使用 python 2 安装软件包,该软件包在 PyPi 上被错误地列为支持 python 2。正如您在official homepage(需求部分)中看到的:

    Watson Machine Learning 服务实例,您可以使用此链接创建实例。仅支持 Python 3.5 或更高版本。

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

    【讨论】:

    • 如何在 Python3 中强制安装 - 我的 MAC OS 中都安装了。
    • 但我正在运行的命令可能仍在使用 python2 'python -m wml.start_training_run' 并显示“没有名为 watson_machine_learning_client 的模块”
    • 添加“3”应该再次成功:python3 -m wml.start_training_run
    猜你喜欢
    • 1970-01-01
    • 2019-11-20
    • 2012-08-08
    • 1970-01-01
    • 2019-11-16
    • 2022-12-01
    • 2020-12-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多