DCOS提供如下安装命令安装cli工具:
mkdir -p dcos && cd dcos &&
curl -O https://downloads.dcos.io/dcos-cli/install.sh &&
bash ./install.sh . https://mydomain.co &&
source ./bin/env-setup
但是,当我在我的 Mac 上运行它时,它会失败并显示以下内容:
mkdir -p dcos && cd dcos &&
| → curl -O https://downloads.dcos.io/dcos-cli/install.sh &&
| → bash ./install.sh . https://mydomain.co &&
| → source ./bin/env-setup
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5163 100 5163 0 0 6460 0 --:--:-- --:--:-- --:--:-- 6469
Installing DC/OS CLI from PyPI...
New python executable in /Users/petr/dcos/bin/python
Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "/Users/petr/dcos/bin/dcos", line 7, in <module>
from dcoscli.main import main
File "/Users/petr/dcos/lib/python2.7/site-packages/dcoscli/main.py", line 7, in <module>
from dcos import config, constants, emitting, errors, http, subcommand, util
File "/Users/petr/dcos/lib/python2.7/site-packages/dcos/config.py", line 10, in <module>
from dcos import constants, jsonitem, subcommand, util
File "/Users/petr/dcos/lib/python2.7/site-packages/dcos/subcommand.py", line 12, in <module>
from subprocess import PIPE
ImportError: cannot import name PIPE
当我在 Ubuntu 上运行相同的命令时,它工作得很好。知道根本原因是什么吗?