将终端位置切到pip所在位置:
如图:
我的pip.exe程序在电脑的“D:\python\django\venv\Scripts\pip.exe”路径
D:\python\django>cd venv
D:\python\django\venv>cd Scripts
输入: pip install django==“版本号”
执行结果:
D:\python\django\venv\Scripts>pip install django==2.2.*
Collecting django==2.2.*
Downloading Django-2.2.25-py3-none-any.whl (7.5 MB)
|████████████████████████████████| 7.5 MB 34 kB/s
Collecting pytz
Using cached pytz-2021.3-py2.py3-none-any.whl (503 kB)
Collecting sqlparse>=0.2.2
Using cached sqlparse-0.4.2-py3-none-any.whl (42 kB)
Installing collected packages: sqlparse, pytz, django
Successfully installed django-2.2.25 pytz-2021.3 sqlparse-0.4.2