Notices


Reply
Thread Tools
Posts: 8 | Thanked: 0 times | Joined on Apr 2016
#1
Hi guys.
He established matplotlib, but ran into problems. When importing crashes.
https://talk.maemo.org/showthread.php?t=72290 here was proposed solution.

Edit the file /usr/lib/python2.5/site-packages/matplotlib/mpl-data/matplotlibrc (you will have to create the mpl-data dir most likely) to read:
datapath : /usr/share/matplotlib/mpl-data
I also set the datapath and backend in my user directory
Nokia-N900:~# cat /home/user/.matplotlib/matplotlibrc
datapath : /usr/share/matplotlib/mpl-data
backend : GTKAgg

I made as proposed, but it cleared up only with the import problem.
Here is the text of the error:

python /home/user/MyDocs/convfield.py > test1.txt
Traceback (most recent call last):
File "/home/user/MyDocs/convfield.py", line 1, in
<module>
from pylab import *
File "/usr/lib/python2.5/site-packages/pylab.py",
line 1, in <module>
from matplotlib.pylab import *
File
"/usr/lib/python2.5/site-packages/matplotlib/pylab.py",
line 216, in <module>
from matplotlib import mpl # pulls in most
modules
File
"/usr/lib/python2.5/site-packages/matplotlib/mpl.py",
line 2, in <module>
from matplotlib import axis
File
"/usr/lib/python2.5/site-packages/matplotlib/axis.py",
line 14, in <module>
import matplotlib.text as mtext
File
"/usr/lib/python2.5/site-packages/matplotlib/text.py",
line 31, in <module>
from matplotlib.backend_bases import RendererBase
File
"/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py",
line 41, in <module>
import matplotlib.textpath as textpath
File
"/usr/lib/python2.5/site-packages/matplotlib/textpath.py",
line 9, in <module>
from matplotlib.mathtext import MathTextParser
File
"/usr/lib/python2.5/site-packages/matplotlib/mathtext.py",
line 1026, in <module>
class StandardPsFonts(Fonts):
File
"/usr/lib/python2.5/site-packages/matplotlib/mathtext.py",
line 1033, in StandardPsFonts
basepath = os.path.join( get_data_path(),
'fonts', 'afm' )
File
"/usr/lib/python2.5/site-packages/matplotlib/__init__.py",
line 248, in wrapper
ret = func(*args, **kwargs)
File
"/usr/lib/python2.5/site-packages/matplotlib/__init__.py",
line 520, in _get_data_path_cached
defaultParams['datapath'][0] = _get_data_path()
File
"/usr/lib/python2.5/site-packages/matplotlib/__init__.py",
line 516, in _get_data_path
raise RuntimeError('Could not find the matplotlib
data files')
RuntimeError: Could not find the matplotlib data
files
N900 with kernel power 53 and CSSU testing+thumb

Last edited by Orkimed; 2016-06-19 at 19:38.
 
Posts: 8 | Thanked: 0 times | Joined on Apr 2016
#2
I dig deeper. Now another error. Cursing at the lack of fonts.

~/MyDocs/murrine-0.90.3 $ sudo python ~/MyDocs/surface3d_dem
o.py
/usr/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py:198:
GtkWarning: Загружаемый модуль тем не найден в
module_path: "murrine",
gtk.DrawingArea.__init__(self)
/usr/lib/python2.5/site-packages/matplotlib/font_manager.py:1242:
UserWarning: findfont: Font family ['sans-serif'] not
found. Falling back to Bitstream Vera Sans
(prop.get_family(), self.defaultFamily[fontext]))
/usr/lib/python2.5/site-packages/matplotlib/font_manager.py:1252:
UserWarning: findfont: Could not match
:family=Bitstream Vera
Sans:style=normal:variant=normal:weight=normal:str etch=normal:size=medium.
Returning
/usr/share/matplotlib/mpl-data/fonts/ttf/cmb10.ttf
UserWarning)
 
Posts: 8 | Thanked: 0 times | Joined on Apr 2016
#3
module_path: "murrine" due to the GTK-engine. Solved in writing datapath agg . Sans-serif fonts is that it uses for processing. I attach a file to it all is.
These addresses have to be files with the same content.
Downloadable fonts (serif and sans-serif) font cache update.
/home/user/.matplotlib/matplotlibrc
/usr/lib/python2.5/site-packages/matplotlib/mpl-data/matplotlibrc

datapath : /usr/share/matplotlib/mpl-data
backend : Agg
font.family : serif
font.serif : Tex Gyre Termes
font.sans-serif : Arsenal
font.cursive : Tex Gyre Chorus
font.monospace : Inconsolata
text.usetex : false

and further . It should be in a folder that normally worked and preserved PNG file
 
Posts: 391 | Thanked: 908 times | Joined on Aug 2011 @ suncity
#4
Hi,

try changing backend to GTKAgg. I use only font.family option.

jm
 

The Following User Says Thank You to justmemory For This Useful Post:
Posts: 8 | Thanked: 0 times | Joined on Apr 2016
#5
Put GTKagg before crashes module_path: "murrine", but now it's fine. It spent normally.
 
Community Council | Posts: 680 | Thanked: 1,227 times | Joined on Sep 2010 @ Mbabane
#6
how did you deal with the fact that matplotlib is not optified?
 

The Following User Says Thank You to sicelo For This Useful Post:
Community Council | Posts: 680 | Thanked: 1,227 times | Joined on Sep 2010 @ Mbabane
#7
can now answer my earlier dumb post - pymaemo-optify
 

The Following User Says Thank You to sicelo For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 13:14.