PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, November 15, 2022

[FIXED] why i am getting - file cannot be loaded because running scripts is disabled on this system

 November 15, 2022     error-handling, pycharm, python, sys, virtualenv     No comments   

Issue

While loading a python file in pycharm i am getting the following warning, earlier it was not there also print('Hello') is working as expected but i am not able to install django.

File C:\Users\abhi\PycharmProjects\django_apps\venv\Scripts\activate.ps1 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.
    + CategoryInfo          : SecurityError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnauthorizedAccess

Solution

Try to check this, it may be helpful.

Here’s how you can make it possible to run the PowerShell script:

Open the admin level terminal for Windows PowerShell or the IDE you are currently using. Enter Get-ExecutionPolicy. It shows the policy for the current PowerShell session. You can also enter Get-ExecutionPolicy -List to list out the policies for all scopes. get-execution-policy Change the execution policy for the scope you want. The command you need for this purpose is: Set-ExecutionPolicy -ExecutionPolicy <policy name> -Scope <scope>. In general, we recommend using Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned, as it is more secure. set-execution-policy If it doesn’t solve the issue, enter: Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

Link



Answered By - Bohdan
Answer Checked By - Mildred Charles (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing