Python3: UnicodeEncodeError: 'ascii' codec can't encode character '\xfc'

后端 未结 4 517
太阳男子
太阳男子 2021-01-11 17:36

I\'am trying to get running a very simple example on OSX with python 3.5.1 but I\'m really stucked. Have read so many articles that deal with similar problems but I can not

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-11 18:13

    Your environment variables set wrong. Work's for me:

    echo "LC_ALL=en_US.UTF-8" >> /etc/environment
    echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
    echo "LANG=en_US.UTF-8" > /etc/locale.conf
    locale-gen en_US.UTF-8
    

提交回复
热议问题