pip install virtualenv
python -m venv test1
.\test1\Scripts\activate
deactivate
pip freeze > requirements.txt
pip install -r requirements.txt
步骤:
找到python的安装路径
win+R,cmd,where python
C:\Users\meizi>where python
D:\codeSoftware\python\python.exe
复制python.exe处在的文件目录,粘贴到test1环境下的配置文件pyvenv.cfg的home路径
home = D:\codeSoftware\python
include-system-site-packages = false
version = 3.8.7
步骤:
删掉script里面的pip.exe,重新安装
python -m pip install -u pip