Reputation: 165
I am having trouble configuring a python interpreter for my project. It was working great a few days ago and all of the sudden I can't configure anything for any project. I'm doing it the exact same way I did it before when it worked and its not working. Every time I try to configure a project interpreter, it gives me a red flag at the bottom and says: Cannot save settings: Please specify a different SDK name.
Does anyone have any suggestions? I tried setting a virtual environment and that doesn't work either. I know its probably something stupid.
Upvotes: 5
Views: 2593
Reputation: 26
For PyCharm2023.1
on Linux the solution is to navigate to ~/.config/JetBrains/PyCharm2023.1/options/jdk.table.xml
and manually remove the invalid interpreters. Each interpreter is enclosed into a <jdk>...</jdk>
block.
A list of all the invalid interpreters can be found by navigating to Settings->Build,Execution,Deployment->Console->Python Console
and checking the list that appears next to Python Interpreter
. The invalid interpreters appear with a red color and a corresponding invalid statement.
Upvotes: 0
Reputation: 1138
This seems to be related to virtual environments having the same name
Upvotes: 1
Reputation: 1029
Find out the directory used by PyCharm to store settings, caches, plugins and logs for your OS from here.
Then try to find a file named jdk.table.xml
within the sub-directories & delete it.
For me, it was ~/.PyCharmCE2018.3/config/options/jdk.table.xml
in Manjaro.
Upvotes: 5