1

I have been desperately looking for an answer for quite a while. My problem:

The problem is:

With Python in Coderunner on a mac, I cannot import matplotlib, always getting:

unknown locale: UTF-8

A bit of historical details:

I used Python 3.4 with Matplotlib using the Coderunner App for programming and running my scripts. Everything was fine. I changed to El Capitan - still everything great. Now I installed Python 3.5 (and was stupid enough to get rid of 3.4).

What I tried so far:

I tried tons of different settings in the locales setting of Coderunner, which is pre-set to variable LC_CTYPE and value UTF-8. I tried lots of de_DE, de_de, en_us, en_US, variations. I added LANGUAGE, LC_ALL and tried more combinations. I reinstalled python, matplotlib and so on dozens of times.

I am quite sure that it is a Coderunner settings issue, because matplotlib runs nicely when I use python3 via terminal.

Is there anybody out there with a solution for that?

ntpop
  • 11
  • 2
  • Are you using the same interpreter in CodeRunner and terminal? Check what's the interpreter in terminal using `which python3` and compare it to the outcome of running this code via CodeRunner `from sys import executable` and then `print(executable)`. Are they the same? – Pouria Feb 07 '16 at 21:17
  • me too but its w/ python 2. did you figure it out? – O.rka Mar 03 '16 at 19:20
  • @PouriaHadjibagheri hey my python is the same from terminal and coderunner but im getting same issue for pandas – O.rka Mar 03 '16 at 19:21

1 Answers1

0

Refer to this post here: Pelican 3.3 pelican-quickstart error "ValueError: unknown locale: UTF-8"

If you're using other program instead of Terminal, simply add LC_ALL and LANG as shell variables, then set their values to be en_US.UTF-8.

Community
  • 1
  • 1
Shuyang
  • 520
  • 4
  • 6