From the course: Flask Essential Training
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Setting up your Flask environment and first application
From the course: Flask Essential Training
Setting up your Flask environment and first application
- [Instructor] First, we need to set up a virtual environment. A virtual environment or venv is a built-in tool in Python that creates a separate, isolated space for your projects. This allows each project to manage its own dependencies independently without interference with other projects. This isolation helps prevent conflicts and keep your development environment clean and organized. The venv module is included in Python 3.3 or later, so you don't need to install anything extra to use it. Open your terminal and navigate to your project directory. If you don't have one yet, let's create it. Let's type mkdir my_first_flask_app. Hit Enter. Let's cd into it. Inside, we'll create our virtual environment. So depending on your system, you'll use Windows, macOS, or Linux. For Windows, you would type this command. And for Linux or macOS, you just need to use, just need to add python3 dash m venv command venv for name, so that's fine. This command creates a new directory named venv. So if…