Reputation: 2487
I have a .venv
folder inside the project root, which has a python virtual environment. When I use the search feature of Pycharm, it also shows the result from this .venv
folder. How can I ignore the virtual environment folder from search results?
I tried marking the directory as Excluded
, but that didn't help.
Upvotes: 20
Views: 2806
Reputation: 2701
I did the above and I still got the search in venv folder. Then I realized that it is a filter I should've use that solves it (mine was Directory):
Upvotes: 0
Reputation: 35404
To get the right answer out, thanks others' answers to this OP, the steps to get rid of .venv in find-in-files are
00 add it to mark as excluded
01 clear cache and restart ide
Upvotes: 0
Reputation: 16841
I'm experiencing the same issue: Even though I've marked the .venv
directory as excluded, its contents still show up in the "Find in Files" search results.
I've found a workaround for this, though. In my "Project Settings" I define an "Exclude files" pattern like so:
**.venv**
as the value for "Exclude files:".Upvotes: 11
Reputation: 8550
Did you exclude the venv folder? Right-click on the .venv
in the project tree -> Mark directory as -> Excluded.
Upvotes: 21