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 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
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: