windows10中安装virtualenv并创建虚拟环境

1.安装virtualenv

pip install virtualenv

2.查看python解释器路径

where python

3.创建一个python3虚拟环境

win+R输入cmd按回车,然后:
D:
cd D:\VScodeProjects\PythonProjects\opms
virtualenv venv -p "C:\Users\test\AppData\Local\Programs\Python\Python37-32\python.exe" 

4.激活虚拟环境以及取消激活状态

cd D:\VScodeProjects\PythonProjects\opms\venv\Scripts
activate
deactivate.bat

 

转载于:https://www.cnblogs.com/DesignerA/p/11609797.html

你可能感兴趣的:(windows10中安装virtualenv并创建虚拟环境)