-1

Nowadays I've studied Flask Web framework for developing app. And I use python for programming language. I searched how to use the Flask then the most people say that when I use flask, I should activate virtual environment so called venv. I got the curiosity at that point why I should use virtual environment when I use Flask Web framework. I appreciate to answer this from everyone. Anybody help me please!

M Z
  • 4,571
  • 2
  • 13
  • 27
  • 1
    You can go through this: https://realpython.com/python-virtual-environments-a-primer/ – Venkat Ramana Aug 28 '20 at 16:19
  • virtual environments are almost always a suggestion and not a requirement, but they can help keep your development environment clean by separating dependencies – M Z Aug 28 '20 at 16:20

2 Answers2

0

I would even use conda (miniconda3) and not just the python-specific virtual environment (conda can handle all other dependencies, too, even system dependencies).

Using virtual environment is very good, because your global system environment with its dependencies - stays unchanged as long as you work inside a virtual environment.

Gwang-Jin Kim
  • 9,303
  • 17
  • 30
0

TL;DR

You don't have to use a virtual environment at all.

What is a virtual environment?

A virtual environment is a Python environment such that the Python interpreter, libraries and scripts installed into it are isolated from those installed in other virtual environments, and (by default) any libraries installed in a “system” Python, i.e., one which is installed as part of your operating system.

The venv folder is a common name for the folder of the virtual environment.

Max Larsson
  • 282
  • 2
  • 10