Serrator
Serrator

Reputation: 11

Python django cant activate virtual enviroment

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

Upvotes: 0

Views: 370

Answers (2)

Manoj Tolagekar
Manoj Tolagekar

Reputation: 1970

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.

Upvotes: 1

Nabin Bhusal
Nabin Bhusal

Reputation: 137

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

Upvotes: 0

Related Questions