Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pycharm ignores new virtual environment after moving existing one or deleting and creating a new one

If I allow PyCharm to create a virtual environment when creating the project, then delete or move the venv folder, it won't let me select a new one. I can go into the Python Interpreter menu in the settings and select an existing one that I created myself (note /brokenInterpreter/oldFolder/venv vs /brokenInterpreter/venv):

enter image description here

But nothing happens when I hit "Ok" in the "Add Python Interpreter" dialog. It simply ignores what I entered. When I exit out, PyCharm still attempts to use the old, non-existant interpreter.

How can I get around this?


PyCharm version: 2022.2 Build #PY-222.3345.131, built on July 27, 2022 (Professional Edition)

like image 983
Carcigenicate Avatar asked Oct 28 '25 01:10

Carcigenicate


1 Answers

I think this is a bug, but I'll document the fix here.

I had to go into the "Show All" menu, and find the old "[invalid]" entry:

enter image description here

Then once that's removed from the list using the - button, I was able to add the new interpreter.

like image 144
Carcigenicate Avatar answered Oct 31 '25 17:10

Carcigenicate



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!