Im using python 10 and windows-11 i try to activate venv with the following command
.\onlineShop\Scripts\activate.bat
I create venv using following command
python -m venv onlineShop
My pip list
Package Version
------------ -------
distlib 0.3.4
filelock 3.6.0
pip 22.0.4
platformdirs 2.5.2
pyaes 1.6.1
Pyrogram 2.0.17
PySocks 1.7.1
setuptools 58.1.0
six 1.16.0
virtualenv 20.14.1
also when Im using .\onlineShop\Scripts\activate
gives me this Error
"cannot be loaded because the execution of scripts is disabled on this system".
Problem : venv is not activated
CodePudding user response:
According to Microsoft Tech Support, it might be a problem with Execution Policy Settings. To fix it, you should try executing the Set-ExecutionPolicy Unrestricted -Scope Process
OR IF this problem is not gone Then please read this answer
To activate
.\Scripts\activate
or
.\Scripts\activate.bat
FOR deactivating venv
.\onlineShop\Scripts\deactivate.bat
or
.\onlineShop\Scripts\deactivate
or
deactivate
CodePudding user response:
Are you getting any errors when trying to activate the virtual environment?
Just try the below
.\onlineShop\Scripts\activate