
上QQ阅读APP看书,第一时间看更新
How to do it...
First, install virtualenv using pip3 and then create a new environment with the name my_flask_env inside the folder in which we ran the first command. This will create a new folder with the same name, as follows:
$ pip3 install virtualenv $ virtualenv my_flask_env
Run the following commands from inside the my_flask_env folder:
$ cd my_flask_env $ source bin/activate $ pip3 install flask
This will activate our environment and install Flask inside it. Now, we can do anything with our application within this environment, without affecting any other Python environment.