-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Description
Bug report
Bug summary
matplotlib-3.0.0 # python3 setup.py build
Fatal Python error: initfsencoding: Unable to get the locale encoding
File "/usr/lib/python2.7/encodings/init.py", line 123
raise CodecRegistryError,
^
SyntaxError: invalid syntax
Current thread 0x00007fbd592bd700 (most recent call first):
Aborted
Note: it's not my fault it is trying to use python2. Even
alias python=python3; python3 setup.py build
fails in the same way.
The only reason I am even trying to install in python 3 is that you no longer support P2, and
matplotlib 2.2 is broken:
python histogram_demo.py
/usr/lib/python2.7/site-packages/matplotlib/axes/_axes.py:6462: UserWarning: The 'normed' kwarg is deprecated, and has been replaced by the 'density' kwarg.
warnings.warn("The 'normed' kwarg is deprecated, and has been "
Traceback (most recent call last):
File "histogram_demo.py", line 10, in
n, bins, patches = plt.hist(x, 50, normed=1, facecolor='green', alpha=0.75)
File "/usr/lib/python2.7/site-packages/matplotlib/pyplot.py", line 3132, in hist
stacked=stacked, normed=normed, data=data, **kwargs)
File "/usr/lib/python2.7/site-packages/matplotlib/init.py", line 1855, in inner
return func(ax, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/matplotlib/axes/_axes.py", line 6606, in hist
color=c, **{bottom_kwarg: bottom})
File "/usr/lib/python2.7/site-packages/matplotlib/init.py", line 1855, in inner
return func(ax, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/matplotlib/axes/_axes.py", line 2233, in bar
np.atleast_1d(x), height, width, y, linewidth)
File "/usr/lib/python2.7/site-packages/numpy/lib/stride_tricks.py", line 119, in broadcast_arrays
zip(args, shapes, strides)]
File "/usr/lib/python2.7/site-packages/numpy/lib/stride_tricks.py", line 32, in as_strided
array.dtype = x.dtype
TypeError: Cannot change data-type for object array.
Code for reproduction
# Paste your code here
#
#
Actual outcome
# If applicable, paste the console output here
#
#
Expected outcome
Matplotlib version
- Operating system:
linux - Matplotlib version:
3.0.0 - Matplotlib backend (
print(matplotlib.get_backend())
): - Python version:
3.7.0 - Jupyter version (if applicable):
- Other libraries: