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

Peewee install on linux

I'm working on a linux machine (mint) which came with python2.7 and 3. I've tried multiple ways of getting peewee, I downloaded pip3, and everything I try seems to give me this error:

error: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/pwiz.py'

is there a brave soul who can help me out? It's confusing having 2.7 and 3, I'm not sure where things want to install or why my system is denying permission. Thanks?

2 Answers

You probably need to use sudo (assuming you have sudo permission on the machine).

sudo python make_me_a_sandwich.py # or whatever command you're using.

It might also be a version issue. you can run "python --version" to check what version the default python command aliases to. "python3" for explicit use of version 3, similarly "python2"

yes, that does the trick, thank you

ah, 'sudo pip3 install peewee' worked. tried it like 15 seconds after asking. maybe someone else will need this help though, so here's a possible solution.