I get the following error when doing this in python:
写道
root@kube-karbor:/opt/kube/yaml# pip install kubernetes
Traceback (most recent call last):
File "/usr/bin/pip", line 11, in <module>
sys.exit(main())
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main
locale.setlocale(locale.LC_ALL, '')
File "/usr/lib/python2.7/locale.py", line 581, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
root@kube-karbor:/opt/kube/yaml# ^C
root@kube-karbor:/opt/kube/yaml#
Traceback (most recent call last):
File "/usr/bin/pip", line 11, in <module>
sys.exit(main())
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main
locale.setlocale(locale.LC_ALL, '')
File "/usr/lib/python2.7/locale.py", line 581, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
root@kube-karbor:/opt/kube/yaml# ^C
root@kube-karbor:/opt/kube/yaml#
Run the following command will solve this.
写道
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
sudo dpkg-reconfigure locales
export LC_CTYPE="en_US.UTF-8"
sudo dpkg-reconfigure locales