1.虚拟环境的创建
安装virtualenv工具
stone@stone-ubuntu:~/Desktop/py_virtual_env$ pip3 install virtualenv
stone@stone-ubuntu:~/Desktop/py_virtual_env$ pwd
/home/stone/Desktop/py_virtual_env
stone@stone-ubuntu:~/Desktop/py_virtual_env$ virtualenv s25 --python=python2.7
stone@stone-ubuntu:~/Desktop/py_virtual_env$ virtualenv s28
stone@stone-ubuntu:~/Desktop/py_virtual_env$ source s28/bin/activate
(s28) stone@stone-ubuntu:~/Desktop/py_virtual_env$ deactivate
stone@stone-ubuntu:~/Desktop/py_virtual_env$
2.安装Django
(s28) stone@stone-ubuntu:~/Desktop/py_virtual_env$ pip3 install django==1.11.7 -i https://pypi.tuna.tsinghua.edu.cn/simple
(s28) stone@stone-ubuntu:~/Desktop/py_virtual_env$ pip3 list
Package Version
---------- -------
Django 1.11.7
pip 21.1.1
pytz 2022.1
setuptools 56.1.0
wheel 0.36.2