Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 17 Online
OpenStudy (coolguy123):

Hi, I'm starting ps6 on 6.00 sc, and i tried to run the complementary software on python 2.7 on a macbook. I realized you need to download updated software of matplotlib and numpy, so i did, but the program the problem set says to run to check if the complementary software isn't working. It runs and no error shows up, but then it just shuts down. Can anyone help me?

OpenStudy (anonymous):

how are you 'running' it?

OpenStudy (coolguy123):

I run the ps6._pkgtest module

OpenStudy (anonymous):

not familiar with Mac's so I don't know what you meant when you say you 'run it'. In a Python shell can you import Matplotlib? Maybe have a look inside ps6._pkgtest and see what it is supposed to be doing and that might give you an idea of what is supposed to happen. http://matplotlib.org/faq/installing_faq.html#matplotlib-compiled-fine-but-nothing-shows-up-when-i-use-it

OpenStudy (coolguy123):

in the beginning of the code it says this: ##import matplotlib import numpy import pylab

OpenStudy (coolguy123):

and it says this in the ps : To test that you have successfully installed matplotlib and numpy, run the code provided in ps6_pkgtest.py, and upload the generated graph as ps6_pylabtest.pdf to your workspace by 11:59pm Lecture 13. If you have problems with installation, be sure to go to office hours for help. Hint: You can use the save button on the pylab figure to save as .pdf.

OpenStudy (anonymous):

Try uncommenting the first line (remove the ##"s) in front of 'import matplotlib' and run it again. If you installed it correctly then it should work.

OpenStudy (coolguy123):

tried it, it still says "python quit unexpectedly" when i run it.

OpenStudy (anonymous):

maybe try installing the Enthought distribution http://www.enthought.com/products/epd_free.php

OpenStudy (rsmith6559):

From my ps12.py: import numpy import random import matplotlib.pyplot as pyplot I had a stinker of a time with the namespace stuff on 10.5.8.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!