Error message about interpreter help

hi. I am trying to make a math algorithm using sympy and pycharm. I just put in
import sympy
sympy sqrt(8)
to try it out. But I get the error message: Invalid python interpreter selected for the project. Why is this happening?

I would guess that your PyCharm IDE has not been configured correctly,
specificly that it hasn’t been told which Python executable to use to
run Python programmes. Have a look at the preferences.

Do you get the same error with a simpler script, eg:

 x = 1

BTW, your script isn’t syntacticly correct:

 import sympy
 sympy sqrt(8)

The second line isn’t valid Python syntax.

Have a look at this tutorial:

It looks like sympy has its own sqrt function, so you probably need:


Note the dot instead of a space.

Cameron Simpson

Ah, I see. I will look into it. Thanks a bunch :slight_smile: