PyCharm won't remove interpreter

已完成

I can't seem to remove an old interpreter from PyCharm's list. When I click the remove button, the interpreter is temporarily deleted, but PyCharm doesn't seem to write/save these settings. This means that the next time I open the preferences, the interpreters I removed are still present.

Manually editing jdk.table.xml to remove the unwanted interpreters works, but I don't think that's the correct way to remove them.

3

Hello, 

 

Yes, this is not expected behavior. 

 

Could you please submit a ticket on https://youtrack.jetbrains.com/issues/PY with attached

logs folder zipped from ***Help | Collect logs and Diagnostic Data** and two copies of jdk.table.xml : 1. before removing an interpreter (just copy it to a different location) and after removing it. 

 

Thank you in advance. 

 

 

 

 

1

I was able to find a solution (thanks to Antonina Belianskaya for accidentally pointing me in the right direction).

Looking at the logs, there was an error that said: "Configuration.PythonSdkDetailsSialog - Please specify a different SDK name"

It turns out that I had a duplicate interpreter name (separate from the one I was trying to remove). Removing the duplicate (the normal way, using the minus button) and reopening the preferences window did the trick.

1

Thank you very much for letting me know!

 

2

I just came to say I had the same issue. Could not remove old invalid interpreters, nor add new ones and have the settings save. The same interpreter was listed twice in 'Project Interpreters' but gave no error. Removing one fixed all the previous issues.

0

Remote interpreters is a complete disaster in PyCharm, this bug is still there and the work around of editing the XML does not always work well. After each change in remote interpreters I need to remove and purge PyCharm from my computer to have a bit of a chance to get things working again.

0
Avatar
Permanently deleted user

I have the same problem that I was not able to solve. The one I'm trying to remove has no duplicates.

I have raised the issue: PY-47255 Unable to remove invalid python interpreters

0

I also had a similar issue with the python interpreters. For a workaround, I manually removed all interpreters or at least the problematic one from ~/.local/share/virtualenvs and then open the one pycharm window and also removed manually from python interpreters afterwards it is completely removed and now I am can create some new interpreters. but yes, It has to be done in a proper way.

0

Thank you for posting your solution Rslpolster - spend one hour trying to figure out why I couldn't add a new interpreter to an existing project - turns out that I had two interpreters (in OTHER projects) with the same name. 

0

请先登录再写评论。