Virtual Environments
Virtual Environments
Important: To understand and apply this guide, it's crucial that you first watch the lesson "Virtual
Environments" to grasp this concept before identifying how to create it in your project.
Since the 2023.2 version of PyCharm, the management of virtual environments for Python projects has
been greatly simplified.
When you create a new project in PyCharm, one of the initial options available is the option to
automatically create and configure a virtual environment.
Upon selecting this option, PyCharm will create a folder called 'venv' (or whatever name you choose) in
which the virtual environment for that project will be set up.
Project location
Create project
Once the project it is created, you’ll be able to see it within the chosen folder. The virtual environment
Will be there too:
Additionally, PyCharm automatically activates this virtual environment when you open the project in the
IDE. This means that when using the terminal within PyCharm, you'll see the name of the virtual
environment (such as 'venv') in the project directory path, indicating that the virtual environment is
activated and all libraries and dependencies installed in that environment will be used for that particular
project.