Home > Software engineering >  Python django cant activate virtual enviroment
Python django cant activate virtual enviroment

Time:11-05

I can't activate virtual enviroment and get 'cannot be loaded because running scripts is disabled on this system'

enter image description here

I tried to write 'activate' and './activate' but both dont work

CodePudding user response:

To solve this error:

Simply you can open powershell as admin and then execute below command:

set-executionpolicy remotesigned

You will be prompted to accept the change, type A(Yes to all), and press ENTER on your keyboard to allow the change.

Close the PowerShell admin window, and go back to the PowerShell Window where you got the error. Run the command below

venv\Scripts\activate

And now your error is solved.

CodePudding user response:

If you are using virtualenv.

venv bin/activate

I am condering venv is your envionment folder and you're on the folder containing your virtual environment.

PS: you can create virtual environment using following command

virtualenv venv -p python3
  • Related