How to activate Python virtual environment without admin privileges?

Viewed 2485

Python 3.8.3, Windows 10

I created a virtual environment using Python's virtualenv package, with this command:

python -m venv C:/<Path>

Now when I try to activate the virtual environment with:

.\C:/<Path>/activate.bat

I get the following error message:

This program is blocked by group policy. For more information, contact your system administrator.

I unfortunately have no way of bypassing the admin blocks on this computer, is there anything I can do?

1 Answers

try to switch symbol / on this \

.\C:<Path>\activate.bat

In windows env activated like this

%venv_folder%\Scripts\activate.bat

or u can use pipenv

1.

pip install pipenv

2.

pipenv shell

3.

pipenv install <lib_name>
  1. For activation env use
exit
Related