pip install - locale.Error: unsupported locale setting

后端 未结 9 1128
时光取名叫无心
时光取名叫无心 2020-12-07 06:58

Full stacktrace:

➜  ~ pip install virtualenv
Traceback (most recent call last):
  File \"/usr/bin/pip\", line 11, in 
    sys.exit(main())
           


        
相关标签:
9条回答
  • 2020-12-07 07:28

    Ubuntu:

    $ sudo vi /etc/default/locale

    Add below setting at the end of file.

    LC_ALL = en_US.UTF-8

    0 讨论(0)
  • 2020-12-07 07:30

    While you can set the locale exporting an env variable, you will have to do that every time you start a session. Setting a locale this way will solve the problem permanently:

    sudo apt-get install locales
    sudo locale-gen en_US.UTF-8
    sudo echo "LANG=en_US.UTF-8" > /etc/default/locale
    
    0 讨论(0)
  • 2020-12-07 07:32

    Run the following command (it will work):

    export LC_ALL="en_US.UTF-8"
    export LC_CTYPE="en_US.UTF-8"
    sudo dpkg-reconfigure locales
    
    0 讨论(0)
提交回复
热议问题