django - Segmentation fault: 11 with Matplotlib python 2.7.8 and Mavericks -
django - Segmentation fault: 11 with Matplotlib python 2.7.8 and Mavericks -
i encounter segmentation fault: 11
when utilize matplotlib in django app.
i utilize :
python 2.7.8 matplotlib 1.4.2 os x 10.9.5 (mavericks)
i have seen many people study segfault 11
:
on os: segmentation fault in django matplotlib, without answer.
with package: segfault 11 pandas python v2.7.6 rc1 on mac os x 10.9
with python 3.3.2: python segfault os x 10.9 mavericks
the problem:
the segfault: 11
comes when seek access view.py
in matplotlib used:
def cht(request): operations = comptes.objects.all() ha = [0] = [0] in operations: if i.commun==true , i.qui=='hadrien': ha.append(i.montant) if i.commun==true , i.qui=='helene': he.append(i.montant) x = range(0, 2) y = (sum(ha), sum(he)) # width of bars width = 0.20 # phone call figure , set size f = plt.figure(figsize=(300,300)) # take size of graph in figure ax = f.add_axes([0.1, 0.1, 0.8, 0.8]) # plot variables ax.bar(x, y, width, align='center', facecolor='green') plt.xlabel('commun') plt.ylabel('montant') plt.xticks(x) ax.set_xticklabels(['aye', 'bee']) plt.grid(true) canvas = figurecanvasagg(f) response = httpresponse(content_type='image/png') canvas.print_png(response) plt.close(f) homecoming response
here error message in terminal :
django version 1.7.1, using settings 'bud.settings' starting development server @ http://127.0.0.1:8000/ quit server control-c. segmentation fault: 11
what i've tried :
as recommended upgraded version of python , have python 2.7.8
problem remains.
i unsuccessfully tried apply patch bug recommended sec reply of thread : segmentation fault: 11 in os x.
edit:
i'm having same problem outside of django code:
import matplotlib.pyplot plt matplotlib.backends.backend_agg import figurecanvasagg x = range(0, 2) y = (50, 20) width = 0.20 f = plt.figure(figsize=(300,300)) canvas = figurecanvasagg(f) canvas.draw()
it gives me same segmentation fault: 11
.
i encountering similar 'segmentation fault 11' errors me using mercurial(hg)
this trying utilize python 2.7.8 installed via installer , pip install mercurial on os x 10.9.5
at first thought related readline.so error , tried renaming (to avoid loading) although found hard understand how help if beingness called upon. found next thread regarding this.
segmentation fault: 11 in os x
in end solution seems have come installing python homebrew , installing python using 2.7.8 release (as of dec 2014)
i reinstalled mercurial brew install mercurial seems have resolved whatever dependencies causing this. wish understood improve happening seg fault couldn't bottom of it.
so, i'm suggesting updating python install brew , reinstalling whatever other packages depend on.
python django osx matplotlib segmentation-fault
Comments
Post a Comment