使用虚拟环境:
1 | haotianfei@tianfei-opensuse:~/pyproject> sudo pip3 install virtualenv |
指定python版本为3.6
1 | haotianfei@tianfei-opensuse:~/pyproject> virtualenv --python=python3.6 django2byExample |
或使用virtualenvwrapper
1 | haotianfei@tianfei-opensuse:~> mkvirtualenv django2byExample |
安装django
1 | (django2byExample) haotianfei@tianfei-opensuse:~> pip install django==2.0.5 |