简体   繁体   中英

Unable to remove old interpreters from Pycharm

When I go to Preferences | Python Interpreter | Show All... (as described here ) and try to remove an old interpreter, it seems to be successfully removed.

If I close and reopen only the Project Interpreters popup window it seems to have saved my changes, but when I close and reopen the Preferences window the interpreters are still there.

This happens regardless of whether I access the preferences window from an open project or not, so it shouldn't be a project-specific issue.


The interpreters I'm trying to remove are for old projects that don't exist anymore (as in the path to the project including the python binary has been deleted).

How can I remove these unused interpreters?

Bonus: what should I do in the future when I delete a project to ensure this doesn't happen?

Correct Answer

Looking at the logs, there was an error when trying to remove that said Configuration.PythonSdkDetailsDialog - Please specify a different SDK name

It turns out that I had a duplicate interpreter elsewhere in the interpreter list. Removing the duplicate (normally, using the minus button) and reopening the preferences window did the trick.


Old Answer

Here's what I ended up doing:

Using this link , I found my configuration directory. I that directory, there was a file at options/jdk.table.xml which contained a list of interpreters.

Manually deleting entries here did the trick.

This still feels wrong to me, though, so I welcome a better solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM