DSS installatino fails: ValueError: unknown locale: UTF-8
Got this when trying to install DSS:
Traceback (most recent call last):
File "/mnt/resource/installers/dataiku/dataiku-dss-3.1.0/scripts/dkuinstall/migrate_auto.py", line 4, in <module>
import base
File "/mnt/resource/installers/dataiku/dataiku-dss-3.1.0/scripts/dkuinstall/base.py", line 8, in <module>
import migration_base
File "/mnt/resource/installers/dataiku/dataiku-dss-3.1.0/scripts/dkuinstall/migration_base.py", line 175, in <module>
import steps
File "/mnt/resource/installers/dataiku/dataiku-dss-3.1.0/scripts/dkuinstall/steps.py", line 8, in <module>
import pandas as pd
File "/mnt/resource/installers/dataiku/dataiku-dss-3.1.0/python.packages/pandas/__init__.py", line 39, in <module>
from pandas.core.api import *
File "/mnt/resource/installers/dataiku/dataiku-dss-3.1.0/python.packages/pandas/core/api.py", line 10, in <module>
from pandas.core.groupby import Grouper
File "/mnt/resource/installers/dataiku/dataiku-dss-3.1.0/python.packages/pandas/core/groupby.py", line 18, in <module>
from pandas.core.frame import DataFrame
File "/mnt/resource/installers/dataiku/dataiku-dss-3.1.0/python.packages/pandas/core/frame.py", line 39, in <module>
from pandas.core.series import Series
File "/mnt/resource/installers/dataiku/dataiku-dss-3.1.0/python.packages/pandas/core/series.py", line 2944, in <module>
import pandas.tools.plotting as _gfx # noqa
File "/mnt/resource/installers/dataiku/dataiku-dss-3.1.0/python.packages/pandas/tools/plotting.py", line 27, in <module>
import pandas.tseries.converter as conv
File "/mnt/resource/installers/dataiku/dataiku-dss-3.1.0/python.packages/pandas/tseries/converter.py", line 7, in <module>
import matplotlib.units as units
File "/mnt/resource/installers/dataiku/dataiku-dss-3.1.0/python.packages/matplotlib/__init__.py", line 1131, in <module>
rcParams = rc_params()
File "/mnt/resource/installers/dataiku/dataiku-dss-3.1.0/python.packages/matplotlib/__init__.py", line 975, in rc_params
return rc_params_from_file(fname, fail_on_error)
File "/mnt/resource/installers/dataiku/dataiku-dss-3.1.0/python.packages/matplotlib/__init__.py", line 1100, in rc_params_from_file
config_from_file = _rc_params_in_file(fname, fail_on_error)
File "/mnt/resource/installers/dataiku/dataiku-dss-3.1.0/python.packages/matplotlib/__init__.py", line 1018, in _rc_params_in_file
with _open_file_or_url(fname) as fd:
File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/mnt/resource/installers/dataiku/dataiku-dss-3.1.0/python.packages/matplotlib/__init__.py", line 1000, in _open_file_or_url
encoding = locale.getdefaultlocale()[1]
File "/mnt/resource/data/dss-data-dir/pyenv/lib64/python2.7/locale.py", line 511, in getdefaultlocale
return _parse_localename(localename)
File "/mnt/resource/data/dss-data-dir/pyenv/lib64/python2.7/locale.py", line 443, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
How can I fix this ?
Answers
-
Hi,
This issue happens when you try to install on a Linux server after doing a SSH connection from a Mac. It is caused by an invalid locale (internationalization) setting on your Mac.
A little known property of the ssh client is that it is able to forward your locale settings so that after remotely connecting, you find yourself with a properly localized machine. Your mac has "UTF-8" as setting for some parts of the locale, which is not valid for your Linux box.
You probably receive a warning when opening the SSH connection like:
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directoryYou can fix this on your Mac side by adding this to your .profile (or .bashrc) file:
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8You can also add this on your .profile (or .bashrc) file on the Linux box itself:
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8After logging out and logging back in, run "locale" on the Linux box, which should not display any error anymore. DSS install will now work properly.