【发布时间】:2018-05-28 20:34:22
【问题描述】:
我正在尝试在我的 mac 上运行一些 kubectl 命令,我使用 pyenv 来管理 python 版本。每当我运行某些 kubectl 命令时,都会导致 kubectl 指出它找不到 python2 命令的错误。
josh@venus:~/pjx/distribut_io ❯ kubectl get pods
Unable to connect to the server: error executing access token command "/Users/josh/google-cloud-sdk/bin/gcloud config config-helper --format=json": err=exit status 127 output= stderr=pyenv: python2: command not found
The `python2' command exists in these Python versions:
2.7.4
fp
josh@venus:~/pjx/distribut_io ❯ which python
/Users/josh/.pyenv/shims/python
josh@venus:~/pjx/distribut_io ❯ which python2
/Users/josh/.pyenv/shims/python2
我尝试将 .python-version 更改为 2.7.4、系统和其他几个版本,但我似乎无法让它工作。好想找个线索,谁能指点一下?
【问题讨论】:
标签: python shell kubectl pyenv