-1

I am this error importing pandas. Can someone give me some hints? I have installed the pandas package.

Traceback (most recent call last):

File "", line 1, in

File "//anaconda/lib/python2.7/site-packages/pandas/init.py", line 44, in

from pandas.core.api import *

File "//anaconda/lib/python2.7/site-packages/pandas/core/api.py", line 9, in

from pandas.core.groupby import Grouper

File "//anaconda/lib/python2.7/site-packages/pandas/core/groupby.py", line 17, in

from pandas.core.frame import DataFrame

File "//anaconda/lib/python2.7/site-packages/pandas/core/frame.py", line 41, in

from pandas.core.series import Series

File "//anaconda/lib/python2.7/site-packages/pandas/core/series.py", line 2909, in

import pandas.tools.plotting as _gfx

File "//anaconda/lib/python2.7/site-packages/pandas/tools/plotting.py", line 28, in

import pandas.tseries.converter as conv

File "//anaconda/lib/python2.7/site-packages/pandas/tseries/converter.py", line 7, in

import matplotlib.units as units

File "//anaconda/lib/python2.7/site-packages/matplotlib/init.py", line 1131, in

rcParams = rc_params()

File "//anaconda/lib/python2.7/site-packages/matplotlib/init.py", line 975, in rc_params

return rc_params_from_file(fname, fail_on_error)

File "//anaconda/lib/python2.7/site-packages/matplotlib/init.py", line 1100, in rc_params_from_file

config_from_file = _rc_params_in_file(fname, fail_on_error)

File "//anaconda/lib/python2.7/site-packages/matplotlib/init.py", line 1018, in _rc_params_in_file

with _open_file_or_url(fname) as fd:

File "//anaconda/lib/python2.7/contextlib.py", line 17, in enter

return self.gen.next()

File "//anaconda/lib/python2.7/site-packages/matplotlib/init.py", line 1000, in _open_file_or_url

encoding = locale.getdefaultlocale()[1]

File "//anaconda/lib/python2.7/locale.py", line 543, in getdefaultlocale

return _parse_localename(localename)

File "//anaconda/lib/python2.7/locale.py", line 475, in _parse_localename

raise ValueError, 'unknown locale: %s' % localename

ValueError: unknown locale: UTF-8

Ray.R.Chua
  • 777
  • 3
  • 8
  • 27
  • Possible duplicate of [IPython Notebook locale error](http://stackoverflow.com/questions/15526996/ipython-notebook-locale-error) – tacaswell Mar 19 '16 at 00:03

1 Answers1

0

I found the answer after some more searching.

Basically, add some lines to your ~/.bash_profile:

export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8

Ray.R.Chua
  • 777
  • 3
  • 8
  • 27