0

I am working on a django project in which it is required to use pandas,mostly for creating dataframe using read_csv method. I am working in a conda virtual env in which pandas is installed as i checked it with :conda list But when i run the file in which i have to import pandas, it shows a valuerror

ValueError: unknown locale: UTF-8

To check if the python version is correct, I tried to import pandas in python shell in same virtual env but I still got he same error. I dont know why i am getting this though pandas is installed in the env.

Here is the screenshort of error I get after trying the two solutions: enter image description here

Ujjawal Malik
  • 65
  • 1
  • 10
  • http://stackoverflow.com/questions/19961239/pelican-3-3-pelican-quickstart-error-valueerror-unknown-locale-utf-8 – cel Jul 11 '16 at 15:33
  • i tried both of them but still got the sam error in python shell and in conda virtual env. – Ujjawal Malik Jul 11 '16 at 15:49
  • I got it correct. Actually both of the solutions partially worked for me but most important is to restart the Mac so that changes are applied to .bash_profile properly. – Ujjawal Malik Jul 11 '16 at 16:08
  • Possible duplicate of [IPython Notebook locale error](http://stackoverflow.com/questions/15526996/ipython-notebook-locale-error) – tacaswell Aug 30 '16 at 00:45

1 Answers1

0

Just add these two line in your .bash_profile, (if you are on bash) export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 and source it, or restart the terminal. Or if you are using "oh my zsh" shell, then add the lines in .zshrc.

aman
  • 11
  • 3