Configuring interpreter in PyCharm: "please use a different SDK name"

I ran into this issue when trying to get docker up and running with Pycharm 2018.1 and using the container's Interpreter. I would get the error below.

"Cannot Save Settings please use a different SDK name"

The issue I had was due to having multiple python interpreters of the same name.

Under Pycharm || Preferences || Project Interpreter

Click "show all" within the Project Interpreter dropdown and then delete any / all interpreters that you don't need.


Jon; I too noticed the difference in the latest version of PyCharm. It seems that it now has an affinity for the latest tool 'venv'. When you create an interpreter - that is what you get.

You can still create a virtualenv manually and point it there instead. I haven't looked into pointing it to a base python-bin because (frankly) you shouldn't generally do it.

My advice (and my proposed answer) is to embrace the change and let it create a 'venv' for you. From there, do all of your installs by "alt-F12". That will open a console with your virtual environment activate -- so your PIP installs into the virtual environment.

Once I began using virtual environments, I never looked back. It has made life much easier in the python world. Pycharm seems to know this as well and is trying to really encourage you to do the right thing.

SteveJ

[Edit Alternate way to get to terminal]

enter image description here


I had the same problem while setting up the virtual environment for my project and no matter if I create a new virtual environment or select an existing one, I get the warning:

"Cannot Save Settings please use a different SDK name"

Finally I found the solution:

Click on the project interpreter dropdown and select show all.... There you might be having multiple virtual environments with same name. Now here is the conflict you need to fix manually by renaming them so every item has the unique name.


How fix this in Windows 10:

  1. close Pycharm .
  2. delete this file: C:\Users\<username>\.PyCharmCE2018.3\config\options\jdk.table.xml
  3. open Pycahrm again and load all python interceptors again.