![](/img/trans.png)
[英]Is it possible to create a Python 3.8 virtual environment without admin privileges if there is only Python 3.4 installed? CentOS
[英]How to activate Python virtual environment without admin privileges?
Python 3.8.3, Windows 10
我使用 Python 的 virtualenv package 創建了一個虛擬環境,命令如下:
python -m venv C:/<Path>
現在,當我嘗試使用以下方法激活虛擬環境時:
.\C:/<Path>/activate.bat
我收到以下錯誤消息:
This program is blocked by group policy. For more information, contact your system administrator.
不幸的是,我無法繞過這台計算機上的管理塊,我能做些什么嗎?
嘗試在此\
上切換符號/
.\C:<Path>\activate.bat
在 windows env 中這樣激活
%venv_folder%\Scripts\activate.bat
或者你可以使用 pipenv
1.
pip install pipenv
2.
pipenv shell
3.
pipenv install <lib_name>
exit
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.