2016-09-19 196 views
2

DCOS提供了以下安裝命令來安裝CLI工具:無法安裝DCOS-CLI在Mac OSX

mkdir -p dcos && cd dcos && 
curl -O https://downloads.dcos.io/dcos-cli/install.sh && 
bash ./install.sh . https://dcos.bondco.io && 
source ./bin/env-setup 

然而,當我在我的Mac上運行此,它失敗,出現以下:

mkdir -p dcos && cd dcos && 
| → curl -O https://downloads.dcos.io/dcos-cli/install.sh && 
| → bash ./install.sh . https://dcos.bondco.io && 
| → 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上運行相同的命令時,它工作得很好。任何想法的根源是什麼?

+0

我應該補充說,當我激活virtualenv環境並啓動Python控制檯時,我可以導入subprocess.PIPE沒有問題。調試很困難。 – pkout

回答

1

我在OS X上安裝DC/OS CLI時遇到的大多數問題都與prerequisites未得到滿足相關。也就是說,在DC/OS 1.8中我們爲CLI引入了binaries(完全避免了你描述的情況)。

+1

謝謝!我爲此回答了一個堅實的解決方法。如果有人直接解決上述問題,我仍然很好奇。 – pkout