
Note that, this should be the same folder where your. the path where you want to create a virtual environment. The shortcut is to type in Ctrl+Shift+`.Ĭopy the folder path i.e. It is actually installed only for that environment, only for that directory where you are creating the virtual environment. py file from any other directory, you will see that the library isn’t installed. If you are trying to run the same code from any other. In a very sober way, you actually are installing the libraries within those folders and within the environment. What is the virtual environment?Īccording to docs, 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. Here the libraries you are installing will not be installed actually in your main system.

This is one of the best and most practiced ways.

The libraries are getting installed here globally, which means inside your system, you can run the code by importing it from any directory. This means every time you want to install a specific library, just open the terminal, type in the command terminal, and hit Enter.
