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

前端 未结 9 1742
生来不讨喜
生来不讨喜 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-name>
    • Project Interpreter
    • Dropdown with the random python interpreter selected
    • Show all
    • Delete the random interpreter wit -
    • Add the correct interpreter with +

    0 讨论(0)
  • 2021-01-17 08:14

    I had such problem. The solution was pretty easy. I created an account in russian in Windows, and you could emphasize that the error message (the big one) then contains the word about encoding is used. Therefore check your Windows account name - change it if it's not in english and contains spaces and other unwanted signs. Thanks.

    0 讨论(0)
  • 2021-01-17 08:14

    I had the same issue. I suspect it occurred whilst i was doing a python project, I was trying to make tensorflow run on my GPU, messing with settings I didn't and still dont really understand (in the terminal with path variables)

    The issue in my case was with my system interpreter. I fixed it by going to the interpreter section in Pycharm and creating a choosing a new interpreter. I edited the "Path" environment\system variables from "...\python.exe\Scripts" to "...\python.exe"

    0 讨论(0)
提交回复
热议问题