Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Data Science Basics Getting Started with Data Science Installing Libraries

V K
V K
5,237 Points

demo.py does not work

I just tried to run the demo.py file in the console and this is the error it gave me.

RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9
Traceback (most recent call last):
File "demo.py", line 10, in <module>
from my_utils import *
File "/home/treehouse/workspace/my_utils.py", line 298, in <module>
import matplotlib.pyplot as plt
File "/usr/local/pyenv/versions/3.5.0/lib/python3.5/site-packages/matplotlib/pyplot.py", line 29, in <module>
import matplotlib.colorbar
File "/usr/local/pyenv/versions/3.5.0/lib/python3.5/site-packages/matplotlib/colorbar.py", line 32, in <module>
import matplotlib.artist as martist
File "/usr/local/pyenv/versions/3.5.0/lib/python3.5/site-packages/matplotlib/artist.py", line 14, in <module>
from .transforms import (Bbox, IdentityTransform, TransformedBbox,
File "/usr/local/pyenv/versions/3.5.0/lib/python3.5/site-packages/matplotlib/transforms.py", line 39, in <module>
from matplotlib._path import (affine_transform, count_bboxes_overlapping_bbox,
ImportError: numpy.core.multiarray failed to import

Also, the SRC folder does not appear in my workspace.

Kat Chuang

Mark Douglass
Mark Douglass
4,093 Points

I am having the same issue

2 Answers

stephenmelendy
stephenmelendy
3,578 Points

Same issue, seems like workspaces doesn't work for this course? It's a little lame.

SH Ding
SH Ding
3,125 Points

Had the same issue too!

The solution is to upgrade numpy to latest version. You can use the command pip install numpy --upgrade