Why do I get an 'SDK seems invalid' error when setting up my Project Interpreter in PyCharm?

前端 未结 9 1749
生来不讨喜
生来不讨喜 2021-01-17 07:35

\"enter

I try to set up project interpteter Python 3.5 in Pycharm and get an SDK error

9条回答
  •  一生所求
    2021-01-17 08:10

    PyCharm picks up random files of format ~/.asdfqwer/python as the Python executable or environment

    On Ubuntu 19.04 pycharm-community 2019.2.3 installed with the snap, PyCharm for some weird reason picks up anything with the form:

    ~/.asdfqwer/python
    

    up as a virtualenv Python interpreter and uses that as the default.

    In my particular case, I had a file called:

    ~/.gdbinit.d/python
    

    for my GDB Dashboard, which is not at all a python interpreter or virtualenv, just a python GDB config as opposed to a .gdb config.

    To solve it, I just had to set the correct interpreter at:

    • File
    • Settings
    • Project:
    • Project Interpreter
    • Dropdown with the random python interpreter selected
    • Show all
    • Delete the random interpreter wit -
    • Add the correct interpreter with +

提交回复
热议问题