How to hide venv in PyCharm Project View

Viewed 3801

I just updated to Python 3.7.2 in PyCharm 2018.3.2 and a new venv folder showed up in my project view. I've read several threads on stackoverflow but haven't found a solution to remove the venv from Project View which is what I want.

I read it's "best practices" to keep the venv with the project but currently I'd rather have it separated and removed from Project View.

Does anyone know how to do this?

EDIT: The problem was I had configured a venv in the PyCharm "Project Interpreter page". If you want to keep everything minimal there's no need for a venv or anaconda, although the PyCharm "Project Interpreter page" layout suggests so. https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html

2 Answers

You can exclude and hide the 'venv' directory (along with other excluded directories) as follows:

  1. Mark it as excluded: right click on the 'venv' directory -> Mark Directory as -> Excluded.
  2. Hide excluded files: click on the tiny gear icon in the Project View panel and deselect 'Show Excluded Files' from the drop down menu.

I often use a lot of methods. The general folder can be hidden, only the venv folder is not allowed, so I can only delete venv, re-configure venv, when re-configuration, do not put venv in the project file In the folder, put a new Venv folder for all applications.

E.g
--Diango
----Myproject
----venv
------Myprojectvenv
Related