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 Flask with SQLAlchemy Basics Creating a Basic Website with Flask Intro to Flask

Error message trying to activate scripts

When typing in the .\env\Scripts\activate to activate, I get an error message saying:

cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1

  • .\env\Scripts\activate

Anybody else had this issue? I am also using vscode.

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Mat Clark! The problem resides in the execution policies granted to PowerShell to run scripts. You should either visit the link provided in the error message to adjust the execution policies (assuming that you have an admin account on that computer), or you could try running it using cmd.exe instead. In either case, I would recommend launching the shell in an "elevated" state, which you can do by right-clicking and choosing "Run as Administrator".

Hope this helps! :sparkles: