{"id":4871,"date":"2019-06-07T18:01:40","date_gmt":"2019-06-07T12:31:40","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=4871"},"modified":"2019-06-07T18:01:47","modified_gmt":"2019-06-07T12:31:47","slug":"valueerror-unknown-locale-utf-8","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/valueerror-unknown-locale-utf-8\/","title":{"rendered":"ValueError: unknown locale: UTF-8"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">ValueError: unknown locale: UTF-8<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Date posted : 07\/06\/2019<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">There are times when install some packages, you will end getting this error due to locale issue.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nTraceback (most recent call last):\n  File &quot;&amp;lt;stdin&gt;&quot;, line 1, in &amp;lt;module&gt;\n  File &quot;\/Users\/pheonix\/webapp\/lib\/python2.7\/site-  \npackages\/pandas\/__init__.py&quot;, line 39, in &amp;lt;module&gt;\n    from pandas.core.api import *\n  File &quot;\/Users\/pheonix\/webapp\/lib\/python2.7\/site-  packages\/pandas\/core\/api.py&quot;, line 10, in &amp;lt;module&gt;\nfrom pandas.core.groupby import Grouper\n  File &quot;\/Users\/pheonix\/webapp\/lib\/python2.7\/site-packages\/pandas\/core\/groupby.py&quot;, line 18, in &amp;lt;module&gt;\n    from pandas.core.frame import DataFrame\n  File &quot;\/Users\/pheonix\/webapp\/lib\/python2.7\/site-packages\/pandas\/core\/frame.py&quot;, line 39, in &amp;lt;module&gt;\n    from pandas.core.series import Series\n  File &quot;\/Users\/pheonix\/webapp\/lib\/python2.7\/site-packages\/pandas\/core\/series.py&quot;, line 2944, in &amp;lt;module&gt;\n    import pandas.tools.plotting as _gfx  # noqa\n  File &quot;\/Users\/pheonix\/webapp\/lib\/python2.7\/site-packages\/pandas\/tools\/plotting.py&quot;, line 27, in &amp;lt;module&gt;\n    import pandas.tseries.converter as conv\n  File &quot;\/Users\/pheonix\/webapp\/lib\/python2.7\/site-   packages\/pandas\/tseries\/converter.py&quot;, line 7, in &amp;lt;module&gt;\n    import matplotlib.units as units\n  File &quot;\/Users\/pheonix\/webapp\/lib\/python2.7\/site-packages\/matplotlib\/__init__.py&quot;, line 1131, in &amp;lt;module&gt;\n    rcParams = rc_params()\n  File &quot;\/Users\/pheonix\/webapp\/lib\/python2.7\/site-  \npackages\/matplotlib\/__init__.py&quot;, line 975, in rc_params\n    return rc_params_from_file(fname, fail_on_error)\n  File &quot;\/Users\/pheonix\/webapp\/lib\/python2.7\/site-packages\/matplotlib\/__init__.py&quot;, line 1100, in rc_params_from_file\n    config_from_file = _rc_params_in_file(fname, fail_on_error)\n  File &quot;\/Users\/pheonix\/webapp\/lib\/python2.7\/site-packages\/matplotlib\/__init__.py&quot;, line 1018, in _rc_params_in_file\n     with _open_file_or_url(fname) as fd:\n  File &quot;\/Users\/pheonix\/webapp\/lib\/python2.7\/contextlib.py&quot;, line 17, in __enter__\n    return self.gen.next()\n  File &quot;\/Users\/pheonix\/webapp\/lib\/python2.7\/site-   packages\/matplotlib\/__init__.py&quot;, line 1000, in _open_file_or_url\n    encoding = locale.getdefaultlocale()&#x5B;1]\n  File &quot;\/Users\/pheonix\/webapp\/lib\/python2.7\/locale.py&quot;, line 545, in getdefaultlocale\n    return _parse_localename(localename)\n  File &quot;\/Users\/pheonix\/webapp\/lib\/python2.7\/locale.py&quot;, line 477, in   _parse_localename\n    raise ValueError, &#039;unknown locale: %s&#039; % localename\nValueError: unknown locale: UTF-8\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\">Solution:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">You need to add locale settings in environment file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open the file and append below lines.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"> $ vim \/etc\/environment<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">LANG=en_US.utf-8&lt;br>\nLC_ALL=en_US.utf-8<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks for using&nbsp;<a href=\"https:\/\/pheonixsolutions.com\/\">pheonix solutions<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You find this tutorial helpful? Share with your friends to keep it alive.<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ValueError: unknown locale: UTF-8 Date posted : 07\/06\/2019 There are times when install some packages, you will end getting this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4877,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[261,292],"class_list":["post-4871","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-architecture","tag-linux","tag-python","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-1gz","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/06\/python-logo-1.png","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=4871"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4871\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media\/4877"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=4871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=4871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=4871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}