<p dir="auto">I want to import matplotlib to django project. I add "import matplotlib.pyplot as plt" in the front of the code and I get this error:<br>
Traceback:<br>
File "/Users/yobichi/wi/lib/python3.5/site-packages/django/core/handlers/base.py" in get_response</p>
<ol dir="auto">
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="            resolver_match = resolver.resolve(request.path_info)"><pre class="notranslate"><code class="notranslate">            resolver_match = resolver.resolve(request.path_info)
</code></pre></div>
File "/Users/yobichi/wi/lib/python3.5/site-packages/django/core/urlresolvers.py" in resolve</li>
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="        for pattern in self.url_patterns:"><pre class="notranslate"><code class="notranslate">        for pattern in self.url_patterns:
</code></pre></div>
File "/Users/yobichi/wi/lib/python3.5/site-packages/django/core/urlresolvers.py" in url_patterns</li>
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    patterns = getattr(self.urlconf_module, &quot;urlpatterns&quot;, self.urlconf_module)"><pre class="notranslate"><code class="notranslate">    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
</code></pre></div>
File "/Users/yobichi/wi/lib/python3.5/site-packages/django/core/urlresolvers.py" in urlconf_module</li>
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="        self._urlconf_module = import_module(self.urlconf_name)"><pre class="notranslate"><code class="notranslate">        self._urlconf_module = import_module(self.urlconf_name)
</code></pre></div>
File "/Users/yobichi/wi/lib/python3.5/importlib/<strong>init</strong>.py" in import_module</li>
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="return _bootstrap._gcd_import(name[level:], package, level)"><pre class="notranslate"><code class="notranslate">return _bootstrap._gcd_import(name[level:], package, level)
</code></pre></div>
File "/Users/yobichi/wi/raptle/raptle/urls.py" in </li>
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="url(r'^rap_song/', include('rap_song.urls', namespace = &quot;rap_song&quot;)),"><pre class="notranslate"><code class="notranslate">url(r'^rap_song/', include('rap_song.urls', namespace = "rap_song")),
</code></pre></div>
File "/Users/yobichi/wi/lib/python3.5/site-packages/django/conf/urls/<strong>init</strong>.py" in include</li>
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    urlconf_module = import_module(urlconf_module)"><pre class="notranslate"><code class="notranslate">    urlconf_module = import_module(urlconf_module)
</code></pre></div>
File "/Users/yobichi/wi/lib/python3.5/importlib/<strong>init</strong>.py" in import_module</li>
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="return _bootstrap._gcd_import(name[level:], package, level)"><pre class="notranslate"><code class="notranslate">return _bootstrap._gcd_import(name[level:], package, level)
</code></pre></div>
File "/Users/yobichi/wi/raptle/rap_song/urls.py" in </li>
<li>from . import views<br>
File "/Users/yobichi/wi/raptle/rap_song/views.py" in </li>
<li>from .topicWords import update_topic<br>
File "/Users/yobichi/wi/raptle/rap_song/topicWords.py" in </li>
<li>import matplotlib.pyplot as plt<br>
File "/Users/yobichi/wi/lib/python3.5/site-packages/matplotlib/<strong>init</strong>.py" in </li>
<li>rcParams = rc_params()<br>
File "/Users/yobichi/wi/lib/python3.5/site-packages/matplotlib/<strong>init</strong>.py" in rc_params</li>
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="return rc_params_from_file(fname, fail_on_error)"><pre class="notranslate"><code class="notranslate">return rc_params_from_file(fname, fail_on_error)
</code></pre></div>
File "/Users/yobichi/wi/lib/python3.5/site-packages/matplotlib/<strong>init</strong>.py" in rc_params_from_file</li>
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="config_from_file = _rc_params_in_file(fname, fail_on_error)"><pre class="notranslate"><code class="notranslate">config_from_file = _rc_params_in_file(fname, fail_on_error)
</code></pre></div>
File "/Users/yobichi/wi/lib/python3.5/site-packages/matplotlib/<strong>init</strong>.py" in _rc_params_in_file</li>
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="with _open_file_or_url(fname) as fd:"><pre class="notranslate"><code class="notranslate">with _open_file_or_url(fname) as fd:
</code></pre></div>
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/contextlib.py" in <strong>enter</strong></li>
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="        return next(self.gen)"><pre class="notranslate"><code class="notranslate">        return next(self.gen)
</code></pre></div>
File "/Users/yobichi/wi/lib/python3.5/site-packages/matplotlib/<strong>init</strong>.py" in _open_file_or_url</li>
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    encoding = locale.getdefaultlocale()[1]"><pre class="notranslate"><code class="notranslate">    encoding = locale.getdefaultlocale()[1]
</code></pre></div>
File "/Users/yobichi/wi/lib/python3.5/locale.py" in getdefaultlocale</li>
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="return _parse_localename(localename)"><pre class="notranslate"><code class="notranslate">return _parse_localename(localename)
</code></pre></div>
File "/Users/yobichi/wi/lib/python3.5/locale.py" in _parse_localename</li>
<li>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="raise ValueError('unknown locale: %s' % localename)"><pre class="notranslate"><code class="notranslate">raise ValueError('unknown locale: %s' % localename)
</code></pre></div>
</li>
</ol>
<p dir="auto">Exception Type: ValueError at /rap_song/lyric/user/fama/<br>
Exception Value: unknown locale: UTF-8</p>
<p dir="auto">I have changed the setting of terminal preferences but when I do this:<br>
import locale<br>
locale.getdefaultlocale()</p>
<p dir="auto">I get : (None, None).<br>
Could you please help me for this issue? Thanks in advance!</p>
<p dir="auto">Hi guys!<br>
I am new to python and matplotlib.<br>
I installed everything with macports and when I run the matplotlib test</p>
<p dir="auto">python2.7 -c 'import matplotlib; print matplotlib.<strong>version</strong>, matplotlib.<strong>file</strong>'</p>
<p dir="auto">I get the following</p>
<p dir="auto">Traceback (most recent call last):<br>
File "", line 1, in <br>
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/<strong>init</strong>.py", line 1131, in <br>
rcParams = rc_params()<br>
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/<strong>init</strong>.py", line 975, in rc_params<br>
return rc_params_from_file(fname, fail_on_error)<br>
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/<strong>init</strong>.py", line 1100, in rc_params_from_file<br>
config_from_file = _rc_params_in_file(fname, fail_on_error)<br>
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/<strong>init</strong>.py", line 1018, in _rc_params_in_file<br>
with _open_file_or_url(fname) as fd:<br>
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 17, in <strong>enter</strong><br>
return self.gen.next()<br>
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/<strong>init</strong>.py", line 1000, in _open_file_or_url<br>
encoding = locale.getdefaultlocale()[1]<br>
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 543, in getdefaultlocale<br>
return _parse_localename(localename)<br>
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename<br>
raise ValueError, 'unknown locale: %s' % localename<br>
ValueError: unknown locale: UTF-8</p>
<p dir="auto">Do you guys have any idea what is happening....I have not done enything weards just follow simple steps to install it.</p>
<p dir="auto">I want to use QUTIP  and the matplotlib is essential for it...please if someone know it would be really nice</p>
<p dir="auto">thanks!<br>
regards,</p>