Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Using Databases in Python Meet Peewee Modeling

MySql not working

When I tried to run the code in the video, I am getting this error. Some help please

Traceback (most recent call last): File "C:/Users/user/AppData/Local/Programs/Python/Python37-32/students.py", line 2, in <module> from peewee import * ModuleNotFoundError: No module named 'peewee'

2 Answers

Jeff Muday
Jeff Muday
Treehouse Moderator 27,586 Points

Did you receive any errors when you installed Peewee? I have multiple versions of Python and many virtual environments. It is easy to get these confused. You can look on your hard drive for peewee.py. I don't know where you installed Python or what operating system you are using, so I can't give you an exact location of where to look.

An alternative to installing with Pip is to install Peewee manually. I believe you could just download peewee.py from the github repository and put it in the same directory as your source code.


You could copy peewee.py directly from here:


I have Python 3.7 and I am using Windows 10.

Jeff Muday
Jeff Muday
Treehouse Moderator 27,586 Points

It looks like you may not have installed the Peewee library.

It should be installed in Treehouse Workspaces. But if you are using your own computer you will need to go to the command line and install it.


pip install peewee

Here is the install documentation link below:


I installed the pee wee but i am still getting the same error.