标签:虚拟 open help version frame install env 命名 mic
调用python3解释器来创建一个flask虚拟环境,python 3.4以下的版本都不行。首先通过以下命令获取python3解释器的路径:
which python3
结果:/Library/Frameworks/Python.framework/Versions/3.5/bin/python3
然后在当前路径下创建一个flask项目,命名为microflask:
mkdir microflask
在microflask文件夹中创建一个flask虚拟环境(会在当前路径下创建一个flask文件夹):
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3 -m venv flask
接下来调用虚拟环境的pip来安装flask及其扩展(在虚拟环境下安装,如果删除虚拟环境所致目录,则以下安装都将被删除):
flask/bin/pip install flask flask/bin/pip install flask-login flask/bin/pip install flask-openid flask/bin/pip install flask-mail flask/bin/pip install sqlalchemy-migrate flask/bin/pip install flask-whooshalchemy flask/bin/pip install flask-wtf flask/bin/pip install flask-babel flask/bin/pip install guess_language flask/bin/pip install flipflop flask/bin/pip install coverage
标签:虚拟 open help version frame install env 命名 mic
原文地址:http://www.cnblogs.com/LanTianYou/p/6042296.html