Python - ValueError: unknown locale: UTF-8 [duplicate]

百般思念 提交于 2019-12-03 16:24:13
Will Angley

Edit: Pandas, and its dependencies, had localization bugs that were discovered in non-C locales and fixed in recent versions.

When I downloaded the latest version of Pandas onto an OS X Yosemite computer via sudo pip install pandas in a terminal set to it_IT.UTF-8, and then imported it in a new Python session, I wasn't able to reproduce this issue.

My best guess now - and I'd emphasize this is only a guess - is that the version of Pandas in that folder predates those fixes and is broken in it_IT.UTF-8. (I do think this is, on balance, more likely than the issue being specific to El Capitan.)


Your LC_ALL= is unset. That seems unusual; based on other answers here I think you should try setting it to LC_ALL="it_IT.UTF-8" and remove the other LC_ settings.

Then save your .bash_profile, open a new terminal tab, and try again.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!