![]() Unlike other libraries, we don’t import venv inside a Python interpreter. We are going to use a Python module called venv, which is part of Python standard library and comes with the Python installation. Create A Python Virtual Environment (venv) When we create multiple virtual environments, each instance is self-isolated and doesn’t interfere with other environments, so we can have different versions of a library on our computer at the same time. ![]() Python Virtual Environment (venv) solves this problem by creating a self-contained copy of Python plus all the libraries. For example, if project A requires pandas version 1.0.1, and project B requires pandas version 1.2.0, there’s no way to install both on a computer. These don’t come with the standard Python installation.ĭepending on the projects we work on, sometimes our task requires a specific version of a library, but we can keep only 1 version of a library at any given time. Most of the time when we use Python, we’ll need to use some third-party libraries, like pandas, plotly, xlwings, etc.
0 Comments
Leave a Reply. |