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

Installing Python Modules with pip - files in site-packages folder and cannot import in python

I have pip installed on my computer but when i run pip install flask or any other module, pip installs inside of the Lib\site-packages folder and I cannot import into python. Is there a fix to this?

Resolved this:

System->Advanced System Settings->Environment Variables-> (Set a new path variable for the site-packages folder)

Jeff Muday
Jeff Muday
Treehouse Moderator 28,732 Points

I've been through this before-- I would definitely recommend learning and using "virtualenv" as it will help you keep your different projects from using conflicting libraries.

This is a very timely question, as Treehouse just launched a new workshop on Pipenv!

1 Answer

I would suggest that you go download Homebrew to install Flask. Its easy and Homebrew installs things in a way that won't mess with system files.

https://brew.sh/