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 Build a Social Network with Flask Making Strong Users Our Project

Pepe Suarez
Pepe Suarez
18,267 Points

Can't Run Peewee

Hey Guys!! I'm trying to use peewee on my computer which is a Mac. I have already made a virtualenv and I was testing the diary program we made on the database course. When I run the diary.py the consoles shows me this

ImportError: no module named peewee

I have already installed flask and peewee. Do I have to install SqLite in order for it to work?? Don't know what might be wrong.

Pepe Suarez
Pepe Suarez
18,267 Points

My computer is a windows sorry!! Hearing so much Mac on the courses made write that lol!

1 Answer

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,453 Points

Hey Pepe,

You need to install peewee in your virtualenv:

$ pip install peewee

If you trying to run the Build a Social Network with Flask workshop files locally, there are some other imports you will also need:

$ pip install flask
$ pip install peewee
$ pip install flask-login
$ pip install py-bcrypt
$ pip install flask-bcrypt
$ pip install flask-wtf

See this answer to How to run flask locally

The virtualenv default is "no-site-packages". Not having access to global site-packages is now the default behavior. So if you installed flask and peewee outside of the virtual env or in a different virtual env those modules would not be found.