You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS: Debian (neurodebian virtual machine: http://neuro.debian.net/vm.html)
Matplotlib version: 1.5.1, installed with miniconda on python 2.7.11
I created a python environment with matplotlib installed (and a bunch of other stuff). Unfortunately, when trying to import matplotlib, I get the following error:
(/home/brain/sct_3.0_beta8/python)brain@neurodebian:~$ python
Python 2.7.11 |Continuum Analytics, Inc.| (default, Dec 6 2015, 18:08:32)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import matplotlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'utf8' codec can't decode byte 0xb1 in position 35: invalid start byte
Any idea where this issue come from and how to fix it?
Thanks!
I didn't try on Python 3 (I'll try soon) and I don't think I have non-ascii characters in my user path.
When I type chr(0xb1), I get the following result:
>>>chr(0xb1)
'\xb1'
And actually, it does not look that I have a .matplotlibrc file... (I looked in .config/matplotlib/)
And it seems matplotlib was not correctly installed. I uninstalled it and reinstalled it and now it works.
That's weird.
The output of chr is a python 2/3 difference. It looks like 3 correctly handles high-code points where as 2 falls back to str(int()) just displaying the hex for the byte value
Activity
tacaswell commentedon May 8, 2016
Do you have non-ascii characters in your user path?
Does this happen with python3?
tacaswell commentedon May 8, 2016
For reference
What is in your
.matlplotlibrcfile?benjamindeleener commentedon May 8, 2016
I didn't try on Python 3 (I'll try soon) and I don't think I have non-ascii characters in my user path.
When I type
chr(0xb1), I get the following result:And actually, it does not look that I have a
.matplotlibrcfile... (I looked in .config/matplotlib/)And it seems matplotlib was not correctly installed. I uninstalled it and reinstalled it and now it works.
That's weird.
tacaswell commentedon May 8, 2016
The output of
chris a python 2/3 difference. It looks like 3 correctly handles high-code points where as 2 falls back tojust displaying the hex for the byte valuestr(int())efiring commentedon Jul 15, 2016
I gather the problem has been solved. If not, feel free to reopen this.